I have two arrays
$last[] = $row1['player_id'];
$first[] = $all['players_id'];
I want to compare $last and $first. If the value is present in both I want to print "X". If it is only in one...do nothing.
I've tried to figure this out, but I'm not getting anywhere. Any help would be appreciated:
for ($i = 0; $i < count($all); $i++)
{
if ($all[$i]['position_id'] == 2) {
echo "<li>" . $all[$i]['fname'] ." " . $all[$i]['lname'] ."</li>";
}
}
Note: I want the "X" to appear before the fname.
Thanks@@