Re: Can PHP exclude % characters in external txt file?

From: Date: Mon, 13 Aug 2001 22:13:40 +0000
Subject: Re: Can PHP exclude % characters in external txt file?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-11314@lists.php.net to get a copy of this message
I can't think of a simple way to do it off of an include, but off the top of my head: <?php $file = file("data.txt"); for($x=0; $x<count($file); $x++){ $temp = str_replace("%", "", $file[$x]); print "$temp\n"; } unset($file, $temp); ?> -- phill "Brian Tegtmeier" <btegtmeier@programmer.net> wrote in message news:20010813212621.17074.qmail@mail.com... > Whats up everybody? I am setting up a PHP script that has a <? include ('data.txt'); ?> text file, but in the actual text file it has a % tag before each item in the list due to a way this database is setup. > > What i am trying to do is have this txt file display on one of my subpages, but have PHP force the removal of the % character when it parses. > > Any suggestions? Thanks for the help! :) > > -- > > _______________________________________________ > FREE Personalized E-mail at Mail.com > http://www.mail.com/?sr=signup > > Talk More, Pay Less with Net2Phone Direct(R), up to 1500 minutes free! > http://www.net2phone.com/cgi-bin/link.cgi?143 >

« previous php.db (#11314) next »