Home > Article > Backend Development > The wonderful use of extract function in PHP bilberryextract vanilla extract regexp extract
PHP’s extract() function, its main function is to expand the array, the key name is used as the variable name, and the element value is the variable value. It can be said that it provides another convenient tool for array operations. For example, it can be very convenient Extraction of
<code><?php extract(<span>$_POST</span>); <span>//</span>相当于<span>$username</span> = <span>$_POST</span>[<span>'username'</span>]; <span>//</span><span>$password</span> = <span>$_POST</span>[<span>'password'</span>]; ?></code>').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });
The above has introduced the wonderful uses of the extract function in PHP, including the extract aspect. I hope it will be helpful to friends who are interested in PHP tutorials.