I am getting the following error when running on PHP 5.3.8
Deprecated: Function eregi_replace() is deprecated in /home/XXXXXX/public_html/admin/modifypoll.php on line 49
This is the line of code, can anyone help please
$question = eregi_replace('</?[a-z][a-z0-9]*[^<>]*>', '', $question );
I am not sure what to change it to. Can anyone help please
the entire ereg family of functions are deprecated in PHP and will at some point be removed from the language. The replacement is the preg family. For the most part, the change is simple:
preg_replace('/[^<>]>/i', '', $question);
^-- ^ ^^
/
)i
), add the i
modifier