
What is the difference between eregreplace() and eregireplace()?

Hi all,
In PHP,
ereg_replace ? Replace regular expression case sensitive.
eregi_replace ? Replace regular expression case insensitive.
Example of ereg_replace :
<?php
$lastname = 'Kumar';
$string = "This is deepak singh.";
$string = ereg_replace('singh', $lastname, $string);
echo $string; /* Output: 'This is deepak kumar.' */
?>
Example of eregi_replace :
<?php
$string = "Hi this is deepak.";
print "Output :" .
eregi_replace("DEEPAK", "Kumar", $string);
/* Output: 'Hi this is Kumar.' */
?>
eregireplace() is case insensitive, while eregreplace() is not.
Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.