We often encounter extracting the abc index value in the array and paying it to the $abc variable, such as $abc = $_POST['abc'],
This requires such a step. If there are several indexes in $_POST that need to be extracted and paid to the corresponding variables, it will be necessary to write them one by one, which is very troublesome. If you use extract, just
extract($_POST), and then use the variable $abc directly below. The other variables in it are also used in the same way.
Example:
<?php $_d['a'] = '变量a'; $_d['b'] = '变量b'; extract($_d); echo $a.'-------'.$b; ?>
Print result:
Variable a--------Variable b