On Wed, 27 Aug 2003 21:30:25 -0700, you wrote:
>Want to remove the string after the first whitespace like:
>
>"here is a text what i have"
>to:
>"here"
I'd explode() the string into an array, and take the 0th element of the
array.
$s = 'here is a text what i have';
$a = explode (' ', $s);
echo (
Andras Kende wrote:
Hello All,
I have a very simple question:
Want to remove the string after the first whitespace like:
"here is a text what i have"
to:
"here"
$word = substr($sentence,0,strpos($sentence,' '));
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
ph
Hello All,
I have a very simple question:
Want to remove the string after the first whitespace like:
"here is a text what i have"
to:
"here"
Thanks !!
Andras Kende
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
3 matches
Mail list logo