String IS an array.

Basically, you could do this:

$str = 'The Dummy String';

for($i=0; $i<strlen($str); $i++) {
        echo $str[$i] . ':';
}

and you sould get the output:

T:h:e: :D:u:m:m:y: :S:t:r:i:n:g:


As of actually converting it you could do that very loop and have an:
$atr_arr[] = $str[$i] in it, or, even more elegantly by using split()
function or "...chunk.." something function(), don't remember right now.

--
Maxim Maletsky
[EMAIL PROTECTED]



Marek Kilimajer <[EMAIL PROTECTED]> 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