array

hi all,

I want to make an array from a variable e.g.:

$num=9;

i want to make an array that contains numbers from 1 to 9, array(1,2,3,4,5,6,7,8,9)

any function i can use to convert $num to above array?

thank you in advance

ben

Hi there,

Try the following:
[php]$num = 9;
$array = range(1,$num);
[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service