$TF_string = "Starscream, Megatron, Jetfire, Optimus Prime";
$TF_array = explode(", ", $TF_string);

print_r($TF_array);


(note the space after the comma in the first argument to "explode()", 
this necessary to avoid the space being include in each element of the 
array)

Hope that helps,

Erik


On Thursday, January 17, 2002, at 05:41  AM, Sandeep Murphy wrote:

> hi,
>
> can i convert a string to an array?? if so how shud the syntax read??
>
> Thnx,
>
> sands
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to