$split = explode(";;", $file);
//Build locations
$locations = array();
for($i = 1; $i < count($split); $i ++)
{
$tempSplits = explode("&", $split[$i]);
array_push($locations, $tempSplits[1]."&&".$tempSplits[2]);
}
It keeps giving me an error saying:
Notice: Undefined offset: 0 in C:\wamp\www\genKml.php on line 16
Notice: Undefined offset: 1 in C:\wamp\www\genKml.php on line 16
But when I used the echo function and the same $tempSplit[1] and 2. It returned the correct output. I'm really confused here.
//Build locations
$locations = array();
for($i = 1; $i < count($split); $i ++)
{
$tempSplits = explode("&", $split[$i]);
array_push($locations, $tempSplits[1]."&&".$tempSplits[2]);
}
It keeps giving me an error saying:
Notice: Undefined offset: 0 in C:\wamp\www\genKml.php on line 16
Notice: Undefined offset: 1 in C:\wamp\www\genKml.php on line 16
But when I used the echo function and the same $tempSplit[1] and 2. It returned the correct output. I'm really confused here.