Oracle Consulting Oracle Training Oracle Support Development
Oracle Books
SQL Server Books
IT Books
Job Interview Books
Rampant Horse Books
911 Series
Pedagogue Books

Oracle Software
Write for Rampant
Publish with Rampant
Rampant News
Rampant Authors
Rampant Staff
Oracle News
Oracle Forum
Oracle Tips
Articles by our Authors
Press Releases
SQL Server Books

Oracle 11g Books

Oracle tuning

Oracle training

Oracle support

Remote Oracle


Privacy Policy




Oracle Tips by Burleson 

array range ( number low, number high [, number step] )

This range() returns an array of elements from low to high, inclusive.  If low > high, the sequence is from high to low. The optional step parameter has been added in PHP 5.0.0.  If a step value is given, it is used as the increment between elements in the sequence. step should be given as a positive number. If not specified, step defaults to 1.  This function is extremely useful in looping through arrays with the foreach statement.

The following example shows how to do this:

Example 11:

    foreach(range(0,10) as $i) {
       $sum += $A[$i];

In this example the range function is used both to define the array $A and to loop through it to compute the sum. 

See code depot for complete scripts

The above book excerpt is from:

Easy Oracle PHP

Create Dynamic Web Pages with Oracle Data

ISBN 0-9761573-0-6   

Mladen Gogala


Download your Oracle scripts now:

The definitive Oracle Script collection for every Oracle professional DBA

Linux Oracle commands syntax poster

ION Oracle tuning software

Oracle data dictionary reference poster

Oracle Forum

BC Oracle consulting support training

BC remote Oracle DBA   



 Copyright © 1996 -2017 by Burleson. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation. SQL Server® is the registered trademark of Microsoft Corporation. 
Many of the designations used by computer vendors to distinguish their products are claimed as Trademarks

Hit Counter