RE: [PHP] Re: There has to be a more elegant way of doing this
| From: | Mike | Date: | Wed, 31 Jul 2002 14:36:02 +0000 |
| Subject: | RE: [PHP] Re: There has to be a more elegant way of doing this | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-110524@lists.php.net to get a copy of this message | ||
Sweet! You rock! It worked perfectly and now I don't have this giant
line in the middle of my script :)
Thanks,
Mike
funyon@funyon.com
mmacrae@wwnet.net
-----Original Message-----
From: lallous [mailto:phplist@lgwm.org]
Sent: Wednesday, July 31, 2002 10:11 AM
To: php-general@lists.php.net
Subject: [PHP] Re: There has to be a more elegant way of doing this
NEWSTRING = preg_replace( array(/WHAT TO SEARCH FOR ARRAY/), array(/WHAT
TO
REPLACE WITH ARRAY/), STRING)
"Mike" <funyon@funyon.com> wrote in message
news:007201c23891$4fee8400$0dc48ed1@intranet.wwnet.net...
> Heya,
> I was just wondering If there is a more elegant way of doing this...
>
> $string =
>
str_replace('%mp3number%',$ARRAY['mp3number'],str_replace('%file_size%',
>
$file_size,str_replace('%url%',$url,str_replace('%title%',$title,str_rep
> lace('%artist%',$artist,$format)))))
>
> Thank You,
> Mike
> funyon@funyon.com
> mmacrae@wwnet.net
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php