There's no built-in function, but try this (copied from manual):
$chars = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY);
Kevin Waterson wrote:
>What is the best method to convert a string to an array
>
>I need to able to loop through each letter of the string
>not just use $string[47]
>
>Is there a definitive method to do this?
>
>Kevin
>
>
>
--
The above message is encrypted with double rot13 encoding. Any
unauthorized attempt to decrypt it will be prosecuted to the full extent
of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
- Re: [PHP] string to array Tom Rogers
- Re: [PHP] string to array Erwin
- Re: [PHP] string to array Timothy Hitchens (HiTCHO)
- Re: [PHP] string to array Erwin
- Re: [PHP] string to array Marek Kilimajer
- Re: [PHP] string to array Maxim Maletsky
- Re: [PHP] string to array Maxim Maletsky
- Re: [PHP] string to array @ Edwin
- Re: [PHP] string to array Maxim Maletsky
- [PHP] string to array Kevin Waterson
- Re: [PHP] string to array Leif K-Brooks
- Re: [PHP] string to array Steve Werby