my webhost company moved my site to a different server with (apparently) a different version of PHP
I started getting a deprecated warning message about ereg_replace
given that my website is live and I'm not a php coder by profession, I'd like to double check my ereg_replace replacement before inserting it.
So. At present in the code is:
$Meta_Description = ereg_replace( ' +', ' ', substr(strip_tags(str_replace("</", " </", stripslashes($Meta_Description))), 0, 500));
I think I should make this replacement:
$Meta_Description = preg_replace( '#[ +]#', ' ', substr(strip_tags(str_replace("</", " </", stripslashes($Meta_Description))), 0, 500));
Can someone comment?
Many thanks!