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], " " ,$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" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "Lisi" <[EMAIL PROTECTED]> 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" <[EMAIL PROTECTED]> > To: "#Linux" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > 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 > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php