I have a variables get from different pages, it's an SMS based APPLICATION.
$message = $_GET['message'];// Message content
// Message = LIVE DEMO 123456789 ;
Now i want these 3 words in different variables, DEMO
and live
is my keyword and 12345679
is value and i want to cross check this value from different table then insert into another table.
Are you asking what it looks like to use explode
in php? If so, here is how it would work with your example.
$message = $_GET['message'];
$results = explode(' ', $message);
This returns the array ...
Array
(
[0] => LIVE
[1] => DEMO
[2] => 123456789
)
You might be wanting the list function
list($firstPart, $secondPart, $thirdPart) = explode(" ", $_GET['message']);
Longhand
$partArry = explode(" ", $_GET['message']);
$firstPart = $partArray[0];
$secondPart = $partArray[1];
$firstPart = $partArray[2];