I have a string
$descr = "Hello this is a test string";
What I am trying to do is to split the string and store each word which is separated using space into separate array index in PHP. Should I use
$myarray = preg_split("[\s]",$descr);
Expected outcome :
$myarray(1) : hello
$myarray(2) : this
$myarray(3) : is
$myarray(4) : a
$myarray(5) : test
$myarray(6) : string
Each number denotes array index