Name

range

Synopsis

array range(mixed first, mixed second[, number step])

Creates and returns an array containing integers or characters from first to second, inclusive. If second is smaller than first, the sequence is returned in reverse order. If step is provided, then the created array will have the specified step gaps in it.

Get Programming PHP, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.