Re: Problems with sprintf and swapping variables
| From: | Richard Lynch | Date: | Wed, 02 May 2001 08:01:26 +0000 |
| Subject: | Re: Problems with sprintf and swapping variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-51150@lists.php.net to get a copy of this message | ||
> Happy %2/$d'th birthday %1/$s.
>
> like the docs says your supposed to do it doesn't work and all you see is:
> Happy $d'th birthday $s.
>
> What is up with this.. if you use %2/%d it sort of works, but it throws
all
> my other variables out of whack.. any help with this would be
appreciative..
I'm guessing you need to escape that $ with a \ using addslashes().
--
WARNING richard@zend.com address is not working -- Use ceo@l-i-e.com
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm