I want to compare a string variable with $city variables in this array using a for loop.this is the array
$return_array[] = array (
(int) $row['tid'],
$city
);
is this correct?
for($i=0;$i<count($return_array);$i++){
if( $return_array[$i][$city]==$another_city ){//mycode}
}
is this correct?I got unexpected result so I ‘m not sure whether this way can I access the city variables.
Not:
$return_array[$i][$city]But:
$return_array[$i][1]