Generating a Range of Numbers the Easy Way

Submitted by Adam » After Haris' mention of the PHP function range(), I thought the kindest thing to do would be to give it a proper introduction. So here is that introduction! Range is native PHP function that takes 2 compulsory arguments and 1 optional argument (As of PHP 5.0.0 which defaults to 1) and returns an array. Seem ever so simple? Well it is! The 3 arguments the function can accept are as follows...
Rating: 3.0/5 | 876 clicks | 0 comments | 1 save | share | report

Comments on this tutorial

Discuss this tutorial

You must be logged in to comment on a tutorial.