Hello, I have three variables, one of which is a mulitarray:
$enough_gas_to_travel=35;
$margin_of_error=3;
$gas_stations=array(
array("name"=>"Chevron","distance"=>15),
array("name"=>"Texaco","distance"=>21),
array("name"=>"Shell","distance"=>23),
...);
How can I cycle through the array? I'd like to figure out the possible outcomes:
if($gas_stations within $enough_gas_to_travel==1){ list the gas station }
else if($gas_stations within $enough_gas_to_travel+$margin_of_error==1){ list the gas station }
else if($gas_stations within $enough_gas_to_travel>1){ list the gas stations }
else if($gas_stations within $enough_gas_to_travel+$margin_of_error>1){ list the gas stations}
else{ number to towing service }