Thanks David, That sorted that out nicely :-)
I hope that helps someone else on the list. Dave C -----Original Message----- From: David Risner [mailto:[EMAIL PROTECTED] Sent: 01 May 2004 14:36 To: Dave Carrera Subject: Re: [PHP] Strip_tags issue / question How about something like: $cleanString = preg_replace("/\s+/m", " ", $spaceyString); I haven't tried this particular preg_replace, but the 'm' option is the important one that tells preg_replace to use the whole string instead of breaking it up by lines. -- David ----- Original Message ----- From: "Dave Carrera" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, May 01, 2004 6:27 AM Subject: [PHP] Strip_tags issue / question Hi List, I am using stip_tags to return to me just the words contained in a page from my website but what is displayed is some thing like this : --- Output Example --- hello world Why so much space ? --- End ----- So where the tags were, whitespace is inserted or kept. Is there a way to remove the whitespace so that the output is something like this? I have tried "trim()" "prg_replace()" str_replace(' ','',$contents) but none of these seem to work. --- Example of what I want --- Hello world why so much space ? --- End --- Thank you in advance for any help or pointers with this one. Dave C --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.672 / Virus Database: 434 - Release Date: 28/04/2004 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.672 / Virus Database: 434 - Release Date: 28/04/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.672 / Virus Database: 434 - Release Date: 28/04/2004 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php