International PHP Conference Munich 2025

Voting

: min(one, five)?
(Example: nine)

The Note You're Voting On

John Brooking
19 years ago
I had a need tonight to convert a numeric array from 1-based to 0-based, and found that the following worked just fine due to the "side effect" of renumbering:

<?php
array_unshift
( $myArray, array_shift( $myArray ));
?>

<< Back to user notes page

To Top