Re: Extracting the essence!

From: Date: Thu, 18 Apr 2002 08:37:22 +0000
Subject: Re: Extracting the essence!
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-18627@lists.php.net to get a copy of this message
Hi All. Thanx Lisi, it worked. But more to come. Have modified the code but, cant get the output i want. $test= preg_replace ($search, $replace, $dokument); while (list ($key, $val) = each($test)) { if ($key <= "5" || $key == "6") { //do nothing } else { echo $key = $val[1],$val[2],$val[3],$val[4], "&nbsp;" ,$val[5]; echo "<br> <br>"; } } Want to display the parsed tabel enteries in diferent ways. The table have dynamic updates and different lengths so I can't use the $val[x]. eg. one line reads before parsed: <tr> <TD ALIGN=right>1</TD> Dont want this entery to show. <TD>test1test1</TD> want to truncate this to the 5 first letters <TD>test2</TD> show this <TD>9</TD><TD>3</TD> show the sum 9+3 <TD ALIGN=center>68-33</TD> show the sum 68-33 <TD ALIGN=right>test3</TD> show this </tr> Regards Stan ----- Original Message ----- From: "#Linux" <linux@bredband.no> To: <php-db@lists.php.net>; "Lisi" <lists@shemeshdirectory.co.il> Sent: Sunday, April 14, 2002 11:24 PM Subject: Re: [PHP-DB] Extracting the essence! > Tanks so far, but if I want don't want to display the 1st and 4th line. > > > ----- Original Message ----- > From: "Lisi" <lists@shemeshdirectory.co.il> > To: "#Linux" <linux@bredband.no>; <php-db@lists.php.net> > Sent: Sunday, April 14, 2002 10:55 PM > Subject: Re: [PHP-DB] Extracting the essence! > > > > > > >Try something like the following to extract the contents of the array by > > >looping through it: > > > > >$test= preg_replace ($search, $replace, $dokument); > > > > while (list ($key, $val) = each($test)) { > > echo $key = $val; > > } > > > > HTH > > > > -Lisi > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.db (#18627) next »