I have this function, I would like to go through the values of it separately but I have here and I'm not able to reason right to do a foreach for example.
<?php
function numeros_pequenos($zero, $um, $dois)
{
return array ($zero, $um, $dois);
}
$zero = 9; $um=8;$dois =7;
$variavel = numeros_pequenos($zero, $um, $dois);
foreach ($variavel as $key) {
echo $key[0];
}
?>
<?php
function numeros_pequenos($zero, $um, $dois) {
return array (
'numero0'=>$zero,
'numero1' =>$um,
'numero2' => $dois);
}
$zero = 9; $um=8;$dois =7;
$variavel = numeros_pequenos($zero, $um, $dois);
echo $variavel['numero0'];
?>