View Single Post
  #80 (permalink)  
Old 08-24-2007, 09:46 AM
Kamalakannan Kamalakannan is offline
D-Web Analyst
 
Join Date: May 2007
Posts: 299
Kamalakannan is on a distinguished road
Default Re: Using Arrays in PHP

hi guys,
i give some more info in array range function.

range() returns an array of elements from low to high, inclusive. If low > high, the sequence will be from high to low.

Parameters:
array range ( mixed low, mixed high [, number step] )

Step should be given as a positive number, If not specified, step will default to 1. it will be used as the increment between elements in the sequence.

eg:
1. $number = range(0, 12); print_r($number);
2. $number1 = range(0, 100, 10); print_r($number1);
3. $chars = range('a', 'i'); print_r($chars);
4. $chars1 = range('c', 'a'); print_r($chars1);

--kamalakannan.
Reply With Quote