top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to replace the null space in the string in PHP ?

0 votes
223 views
How to replace the null space in the string in PHP ?
posted Jul 10, 2014 by Amarvansh

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes
$text = str_replace("\0", "", $text);

will replace all null characters in the $text string. You can also supply arrays for the first two arguments, if you want to do multiple replacements.

answer Aug 14, 2014 by Vrije Mani Upadhyay
...