note 50539 added to function.ereg-replace
| From: | bgoodman at osogrande dot com | Date: | Wed, 02 Mar 2005 22:25:26 +0000 |
| Subject: | note 50539 added to function.ereg-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-85829@lists.php.net to get a copy of this message | ||
When you are dealing with databases you can end up with quite a few \" to deal with. To
ereg_replace all these with something else it requires you to \ the \ and \ the " so you end up
with:
$var1 = '\"';
$var2 = ereg_replace('\\\"','1234',$var1);
print $var2; //this should print 1234
----
Manual Page -- http://www.php.net/manual/en/function.ereg-replace.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+50539
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50539&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50539&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50539&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50539&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50539&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+50539&report=yes
Search -- http://master.php.net/manage/user-notes.php