lets say i have this string here: $string = 'hello my name is "nicholas cage"'
.
i want to separate the words into difference strings like this:
$word1 = 'hello';
$word2 = 'my';
$word3 = 'name';
$word4 = 'is';
$word5 = 'nicholas cage';
For fhe first 4 words I can use explode. but how do i do with word5? I want the first and last name to be one string.