I want to cut a string in half, and get the first half of the string to be one value the second half to be another.
The string is $_GET['s'] it has a couple of words and in the middle of them four blank spaces.
I want to get the words before the blank spaces and the words after the blank spaces.
E.G:
pizza soda
echo "$food;" ==> pizza
echo "$drink; ==> soda
1 Answer