Pogledajte određenu poruku
Staro 15. 02. 2011.   #2
webarto
expert
Grand Master
 
Avatar webarto
 
Datum učlanjenja: 11.04.2010
Poruke: 998
Hvala: 141
959 "Hvala" u 153 poruka
webarto is on a distinguished roadwebarto is on a distinguished roadwebarto is on a distinguished roadwebarto is on a distinguished roadwebarto is on a distinguished roadwebarto is on a distinguished roadwebarto is on a distinguished roadwebarto is on a distinguished road
Default

http://php.net/manual/en/function.strcmp.php ?

PHP kôd:
$string1 "ÿþýü";
$string2 "ÿþýü";

echo 
strcmp($string$string2); // 0 
0 znači da su identični


Što se tiče hexdec, imaš temu juče otvorena...

Preg_replace by jablan
PHP kôd:
$string "!\"#$%&'()";
 
$hex preg_replace("/(.)/es""sprintf(' %02X', ord(stripslashes('$1')))"$string);
 
echo 
$hex
by me...
PHP kôd:
$string "!\"#$%&'()";

function 
strhex($string){
    for(
$i 0$i strlen($string); $i++){
        
$hex unpack('H*'substr($string$i1));
        
$return .= $hex[1]." ";
    }
return 
$return;
}

echo 
strhex($string); // 21 22 23 24 25 26 27 28 29 
Ova moja funkcija vraća "c3 bc", za umlaut odnosno 252 karakter.

Poslednja izmena od webarto : 15. 02. 2011. u 17:48.
webarto je offline   Odgovorite uz citat
"Hvala" webarto za poruku: