<?php $input = array(12, 10, 9); $result = array_pad($input, 5, 0); // Le résultat est array (12, 10, 9, 0, 0) $result = array_pad($input, -7, -1); // Le résultat est array (-1, -1, -1, -1, 12, 10, 9) $result = array_pad($input, 2, "noop"); // pas complété ?>
|