-1

can someone show me how to convert this please

eregi_replace(":rolleyes:", "<img src='./images/smilies/icon_rolleyes.gif' border='0'> ", $

i have tried lookin gonline but carnt get my head around it keep getting this error keep getting

PHP Deprecated: Function eregi_replace() is deprecated in

Progman
  • 16,827
  • 6
  • 33
  • 48
  • You do not need any regular expression replacements, a simple `str_replace()` will do the work in this case. – Progman Jan 17 '22 at 20:05

1 Answers1

0

The eregi_replace function is deprecated as of PHP 5.3. You should use preg_replace with the i modifier instead:

preg_replace('/:rolleyes:/i', '<img src="./images/smilies/icon_rolleyes.gif" border="0">', $var);

cOle2
  • 4,725
  • 1
  • 24
  • 26