<?php
$a= Array("0" => Array("intTrackId" => 41, "intAverageRating" => 10, "bolNewRelease" => 0 , "dtDateAdded" => "2013-03-08 17:32:26") ,
"1" => Array("intTrackId" => 1 ,"intAverageRating" => 7 ,"bolNewRelease" => 0 ,"dtDateAdded" => "2013-03-08 18:54:35"));
$b=Array("0" => Array("intTrackId" => 41, "intAverageRating" => 5.5000 ,"bolNewRelease" => 1, "dtDateAdded" => "2014-03-25T09:39:28Q") ,
"1" => Array("intTrackId" => 361 ,"intAverageRating" => 8.0000 ,"bolNewRelease" => "1" , "dtDateAdded" => "2014-03-25T09:39:28Q")) ;
$res = array();
foreach($a as $key=>$values)
{
if($values["intTrackId"] == $b[$key]["intTrackId"])
{
unset $a[$key];
}
else
{
$res=$values;
}
}
print_r($res);
- Output for 5.4.0 - 5.4.26
- Parse error: syntax error, unexpected '$a' (T_VARIABLE), expecting '(' in /in/GIgW6 on line 14
Process exited with code 255. - Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.28
- Parse error: syntax error, unexpected T_VARIABLE, expecting '(' in /in/GIgW6 on line 14
Process exited with code 255. - Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
- Parse error: parse error, unexpected T_VARIABLE, expecting '(' in /in/GIgW6 on line 14
Process exited with code 255. - Output for 4.3.2 - 4.3.4
- Parse error: parse error, expecting `'('' in /in/GIgW6 on line 14
Process exited with code 255.
preferences:
235.73 ms | 1399 KiB | 116 Q