blackwater dev wrote:
> What is the best way to do this? I have two arrays:
>
> $cars=array("ford","chevy");
> $models=array("ford"=>array("ranger","escape"),"chevy"=>array("malibu","tahoe"));
>
> then I need to traverse both arrays:
>
>foreach ($cars as $car){
> //now I need
Forget about the $cars array. The array "key" in the $models array will
be your car list.
$cars=array("ford","chevy");
$models=array("ford"=>array("ranger","escape"),"chevy"=>array("malibu","
tahoe"));
//Loop through first level of array, getting car maker
foreach($models as $carmaker=>$models)
Hello all,
What is the best way to do this? I have two arrays:
$cars=array("ford","chevy");
$models=array("ford"=>array("ranger","escape"),"chevy"=>array("malibu","tahoe"));
then I need to traverse both arrays:
foreach ($cars as $car){
//now I need to get into the models
3 matches
Mail list logo