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: [EMAIL PROTECTED]
Web: www.healthtvchannel.org

----- Original Message ----- 
From: "Erich Kolb" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to