String to Byte array in PHP [closed]

KismAttilia

New Member
How can I get the byte array from some string witch can contains numbers,letters and so on!?If u are familiar with java I am looking for same functionality of getBytes() method.I tried with snippet like this one:\[code\]for($i = 0; $i < strlen($msg); $i++){ $data.=ord($msg[$i]); //or $data[]=ord($msg[$1]); }\[/code\]but without success I think, so any kind of help will be apreciated.Ps.Why do I need this at all!? Well I need to send via fputs() bytearray to server written in java...
 
Back
Top