I want to remove the ¶ paragraph mark from a string. I've already tried strip_tags and preg_replace, but its not working. The string is located in a mysql record. I've tried removing it before I save it in database and before displaying it but nothing seems to work.
Any help appreciated.
Show your real string with ¶ because this works just great:
<?php
$string = 'Hi¶ this is a string with a paragraph¶';
$string = str_replace( "¶", "", $string );
echo $string;
?>
Output
Hi this is a string with a paragraph
This worked for me
$mystring = preg_replace( '/\s+/', ' ', $mystring);
Removes the white spacing from the string