update page now

Voting

: five minus zero?
(Example: nine)

The Note You're Voting On

danbettles at yahoo dot co dot uk
16 years ago
When using EXTR_PREFIX_ALL - and probably all the other EXTR_PREFIX_* constants - and a numerically-indexed array, extract() will add an underscore ("_") between the prefix and the index.

<?php

extract(array('foo', 'bar'), EXTR_PREFIX_ALL, 'var');

print_r(get_defined_vars());  // Reveals $var_0 = 'foo' and $var_1 = 'bar'
?>

<< Back to user notes page

To Top