note 57271 rejected from function.trim by betz
| From: | betz@php.net | Date: | Thu, 29 Sep 2005 07:37:39 +0000 |
| Subject: | note 57271 rejected from function.trim by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-95953@lists.php.net to get a copy of this message | ||
Note Submitter: foxlance_g at yahoo dot com
----
i have this project that parses html to extract some values, like the one from jobsites.
now the problem is the filed im to extract looks like this on the source codes
name
surname
i did a trim, but it only deals with the front and end of the string, not on the inside, i
formulated a str_replace function, but if im going to replace all ' ' (whitespaces), the
values will merges 'val1val2' right?
how can i delete all unnecessary whitespaces, and leave only one in between words in a string, like
if
var='lance vincent'
var should be
var='lance vincent'