alex
2015-07-11 19:00:23 UTC
In this function
function fty($op, $t= array())
{
...
}
inner with a print_r of $t
I have this
Array (
[0] => 2
[1] => 10
)
I need to call same function more time with a cicle
but not know how to do
only so work:
for test I created one my array with [0] => 2 and [1] => 10
but work only if I write so:
$n=0;
foreach ($myarr as $key_g => $t_g) {
$app[$n++] = $t_g;
};
foreach ($myarr as $key_g => $t_g) {
fty($op, $app);
};
how can call the function directly not using the first loop;
loop that reconstructs only the pair key value thet I already have
function fty($op, $t= array())
{
...
}
inner with a print_r of $t
I have this
Array (
[0] => 2
[1] => 10
)
I need to call same function more time with a cicle
but not know how to do
only so work:
for test I created one my array with [0] => 2 and [1] => 10
but work only if I write so:
$n=0;
foreach ($myarr as $key_g => $t_g) {
$app[$n++] = $t_g;
};
foreach ($myarr as $key_g => $t_g) {
fty($op, $app);
};
how can call the function directly not using the first loop;
loop that reconstructs only the pair key value thet I already have