php-general | 2005051
Date: 05/09/05
- Next message: The Doctor: "Re: [PHP] Question about acessing databases and formatting output"
- Previous message: bala chandar: "Re: [PHP] text with $"
- In reply to: Marek Kilimajer: "Re: [PHP] text with $"
- Next in thread: bala chandar: "Re: [PHP] text with $"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
El Lun 09 May 2005 11:44, Marek Kilimajer escribió:
> Martín Marqués wrote:
> > I have a text variable that contains "$" symbols, that when I pass it out
PHP
> > thinks that the "$" mean that a variable name comes right after.
> >
> > I tried escaping the "$" put with no luck.
> >
> > Is there something I can do?
> >
>
> How did you escape the symbol? You should use backslash: \
Sorry, my misstake. :-(
I was doing:
srt_replace("$","\$",$string);
instead of:
srt_replace("$","\\$",$string);
Forgot to escape the escape caracter! :-D
--
11:45:49 up 37 days, 20:09, 2 users, load average: 1.37, 1.07, 1.06
-----------------------------------------------------------------
Martín Marqués | select 'mmarques' || '@' || 'unl.edu.ar'
Centro de Telematica | DBA, Programador, Administrador
Universidad Nacional
del Litoral
-----------------------------------------------------------------
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: The Doctor: "Re: [PHP] Question about acessing databases and formatting output"
- Previous message: bala chandar: "Re: [PHP] text with $"
- In reply to: Marek Kilimajer: "Re: [PHP] text with $"
- Next in thread: bala chandar: "Re: [PHP] text with $"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

