This is my code, currently I am able to break it into two variable successfully
$string="life really";
list($firstName, $lastName) = explode(" ", $string);
echo $firstName;
echo $lastName;
the output will be like
life
really
This is my second try
$string="life really suck";
list($firstName, $lastName) = explode(" ", $string);
echo $firstName;
echo $lastName;
it only echo first and last word in the string
which is life and suck, it didn't capture "really suck" in the $lastname
What I wanted to do is, I want to capture the first word in the $firstname and capture the whatever after the first spacing and place in the $lastname.
Is it possible?
list