strip_tags() Quandry....

From: Date: Wed, 28 May 2003 03:56:35 +0000
Subject: strip_tags() Quandry....
Groups: php.general 
Request: Send a blank email to php-general+get-149179@lists.php.net to get a copy of this message
Hey all. I've got a chunk of HTML text I'd like to format for insertion into our mySql db. Let's say $html_string equals the following: <tr> <td>1</td> <td>Bardo, Jesse</td> <td>S</td> <td>A</td> <td>Andover, MA</td> </tr> To setup this chunk of text for insertion I first use strip_tags($html_string); that results in: 1 Bardo, Jesse S A Andover, MA I then use str_replace(",","",$html_string) to create a space delimited string. Here's where I believe the problem occurs. There are apparently numerous blank spaces within the string. I've tried replacing the blank spaces, or whatever is separating the data to no avail. I've tried a number of aimless efforts to get the string properly formatted, but no luck -- any suggestions? Thanks for helping me over this hurdle....... --Noah

« previous php.general (#149179) next »