php - foreach trying to make 3 parameters -
is there way make happen? foreach 3 paramaters
something this
foreach ($value $v,$value2 $v2,$value3 $v3) <?php echo $v->name?> <?php echo $v->actual?> <?php echo $v2->estimated?> <?php echo $v3->projected?>
i think want
foreach ($value $v) { foreach($value2 $v2) { foreach($value3 $v3) { echo $v->name; echo $v->actual; echo $v2->estimated; echo $v3->projected; } } }
or:
foreach ($value $v,$value2 $v2,$value3 $v3) { echo $v->name; echo $v->actual; } foreach($value2 $v2) { echo $v2->projected; } foreach($value3 $v3) { echo $v3->estimated; }
which may have known, don't think it's possible put 3 1 you're asking.
edit: bit more information on $value
arrays contain, may easier provide solution can more accomplish you're trying do.
Comments
Post a Comment