how to write a function to output unconstant loop with PHP
Posted
by tunpishuang
on Stack Overflow
See other posts from Stack Overflow
or by tunpishuang
Published on 2010-04-13T04:38:01Z
Indexed on
2010/04/13
4:43 UTC
Read the original article
Hit count: 304
here is the function description
test($argv)
$argv is an array , for example $argv=array($from1,$to1,$from2,$to2.....); array items must be even.
$argv=array(1,2,4,5) : this will output values like below:
1_4 1_5 2_4 2_5
the number of arrray $argv's is not constant. maybe 3 or 4 levels of loop will be outputed.
i know this will used RECURSIVE , but i don't know exatly how to code.
© Stack Overflow or respective owner