I have a string.
$string = "this is my string";
So I want to explode it.
$explode = explode(' ', $string);
Now I want to know if it's possible to insert each word into an array so I can get this.
$array = array('this', 'is', 'my', 'string');
Just like Frayne Konok said, the $explode is the array similar to $array. The explode function already did it.
$explodeis the array similar to$array. Theexplodefunction already did it.$explode, what is the problem?!explode()you already have desired array ($array=$explode)var_dump($my_var)ouprint_r($my_var)to see what is in your variable.