Hello i'm new in here

I have got this problem and i don't know php totally. Please help me to fix that!

Fatal error: Uncaught Error: Call to undefined function eregi_replace() in C:\xampp\htdocs\admin\index.php:203 Stack trace: #0 C:\xampp\htdocs\admin\index.php(92): color('\xFF\xFF\xFF\xFFprint\n"sv_h...') #1 {main} thrown in C:\xampp\htdocs\admin\index.php on line 203

Line 203: $text = eregi_replace('^0', '<font color="gray">',$text);

    The reason the function is undefined is because it has been removed from php. If you check the php.net documentation for that function, you will find the suggested alternative you can use when rewriting the code.

    9 days later

    The eregi_replace() is switched to preg_replace() You need to use preg_replace() instead of eregi_replace() I hope it would be helpful for you.

    $text = eregi_replace('^0', '<font color="gray">',$text);
    
    $text = preg_replace('^0', '<font color="gray">',$text);

    ahmedfahad007 You need to use preg_replace()

    ...with a /i regex modifier if you need the case-insensitivity of eregi.

      Write a Reply...