Re:\ Char Question
| From: | Sam Masiello | Date: | Wed, 13 Dec 2000 02:56:24 +0000 |
| Subject: | Re:\ Char Question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-30008@lists.php.net to get a copy of this message | ||
Since the \ character means to take the next character literally, it is likely having a problem with
the fact that you have a backslash right before your double quote mark. If you want a literal
backslash, you need to use two backslashes.
Try: $str = strtr($str, "m", "/\\/\\") ;
That should do what you are looking for.
HTH
Sam Masiello
System Analyst
Chek.Com
(716) 853-1362 x289
smasiello@chekinc.com
On Tue, Dec 12th 2000 19:59:04 Matt Stone <matt@planetveggie.com> wrote:
>Hi,
>I am trying this code:
>$str = strtr($str, "m", "/\/\");
>The problem is that I have an error from tying to echo the \ char. How would
>I fix this?
>Thanks,
>
>Matt Stone
>
>_______________________________
>
>This email may contain confidential and/or privileged information for the
>sole use of the intended recipient. Any review or distribution by others is
>strictly prohibited. If you have received this email in error, please
>contact the sender and delete all copies. Opinions, conclusions or other
>information expressed or contained in this email are not given or endorsed
>by the sender unless otherwise affirmed independently by the sender.
>
>_________________________________
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
>For additional commands, e-mail: php-general-help@lists.php.net
>To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>