<? php
$ar1=array(1,2,3,4,5);
$ar2=array(11,22,33,44,55);
$arr3=array(array_merge($arr1,$arr2);
print_r($arr3);
shuffle($arr3);
echo"array is shuffed";
foreach($arr3 as $a)
{
echo"<br>",$a;
}
$str=implode(" and '),$ar3);
echo"<br>after implode of array 4ar3 is <br> $str";
$str="india is our country";
echo"<br> explode example for 4str1 is </br>";
$country=explode("",$str1);
print_r($country);
$song="twinkle twinkle";
$songArray=explode(',',$song);
echo"<br>after explode 3rd element is",$songArray[3];
?>
<? php
$ar1=array(1,2,3,4,5);
$ar2=array(11,22,33,44,55);
$arr3=array(array_merge($arr1,$arr2);
print_r($arr3);
shuffle($arr3);
echo"array is shuffed";
foreach($arr3 as $a)
{
echo"<br>",$a;
}
$str=implode(" and '),$ar3);
echo"<br>after implode of array 4ar3 is <br> $str";
$str="india is our country";
echo"<br> explode example for 4str1 is </br>";
$country=explode("",$str1);
print_r($country);
$song="twinkle twinkle";
$songArray=explode(',',$song);
echo"<br>after explode 3rd element is",$songArray[3];
?>
Output for 8.0.13
Parse error: syntax error, unexpected variable "$ar1" in /in/XXVlM on line 2
Process exited with code 255.
Output for 7.3.32 - 7.3.33, 7.4.33
Parse error: syntax error, unexpected '$ar1' (T_VARIABLE) in /in/XXVlM on line 2
Process exited with code 255.