Folks,
I've got the right answer from another forum.
Solution is to use this:
$str = preg_split('/\00/', $str);
Thanks anyway.
Jane
User Profile
Collapse
-
Pattern matching for ASC 0 character
I need to parse/extract data out of string that is delimited by ASCII 0 character.
When I try to use explode('0',$my data) it converts mydata to an array incorrectly.
Some array elements are empty and some are split in the middle.
I also tried str_replace('0' ,'#', $mydata) and preg_replace('0 ','#', $mydata) - they both do not work at all.
It sounds like I have to parse string manually byte by byte myself. Is there... -
Fixed:
I was able to figure it out. Just included
extension=socke ts.so
in php.ini file and restarted Apache.
JaneLeave a comment:
-
PHP: Undefined functon socket_create()
Hi all,
I'm trying to use socket_create() function from my PHP script and getting this error:
"Call to undefined function: socket_create() "
I'm running PHP 4.4.2 on Linux with Apache 2.0.
I checked phpinfo() and it displays
'--enable-sockets=shared'
inside "Configure" command info. I assume that it means this PHP was configured with this option, right?
Can somebody explain what...
No activity results to display
Show More
Leave a comment: