how to convert a string to an array in php [duplicate]

Use explode function

$array = explode(' ', $string);

The first argument is delimiter

Leave a Comment