Re: CleanUp!!
| From: | Matt Grimm | Date: | Wed, 28 May 2003 19:24:27 +0000 |
| Subject: | Re: CleanUp!! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-149309@lists.php.net to get a copy of this message | ||
First, make sure to use str_replace whenever possible instead of
ereg_replace. It's faster:
$out_file = str_replace("http://", "", $in_file);
etc...
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK 99508
907.770.6200 ext. 686
907.336.6205 (fax)
E-mail: mgrimm@healthtvchannel.org
Web: www.healthtvchannel.org
----- Original Message -----
From: "Erich Kolb" <ekolb@randbreceivables.com>
To: <php-general@lists.php.net>
Sent: Wednesday, May 28, 2003 11:11 AM
Subject: [PHP] CleanUp!!
> How can I clean this up?
> $in_file = http://somedomain.com/somefile.php;
>
> $out_file = ereg_replace("http://", "",
> $in_file);
> $out_file = ereg_replace("/","-", $out_file);
> $out_file = "/www/dev/".$out_file;
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>