Quick and Dirty:

<?php

$string = 'hello how are you today';

$new_string = preg_split("/[\s]?/", $string);

print_r($new_string);

?>



Timothy Hitchens (HiTCHO)
[EMAIL PROTECTED]


If you need PHP hosting with an experienced
support team 24/7 then email me today.

On Fri, 8 Nov 2002, Marek Kilimajer wrote:

> Hi all,
>
> has anyone an elegant (and faster) way of converting 'string' to
> array('s','t','r','i','n','g'), other then
> for($i=0; $i<strlen($string); $i++) $array[$i]=$string[$i];
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to