i.e 2, 5 and 7($variable) and 3,4,9 ($moreV) (all stored in an array)
These are being passed in using a loop (foreach loop) to this function.
For each variable instance i pass in, i want to perform some calculations...
so this is what i have so far...
Code: Select all
<?php
function name($variable, $moreV)
{
while ($variable = 2) {
//do something... (print $moreV)
}
}
?>I simply want to use each instance one at a time.
Using an IF statement prints all instances. (i.e 3, 4, 9)
How can i perform calculations on the different instances in turn?
Cheers