<?php
$name = 'Deepak';
$class = '12th';
$marks = 100;
echo "<pre>";
print_r(compact('name','class','marks'));
foreach(get_defined_vars() as $key =>$value){
if(in_array($key,['_GET','_POST','_COOKIE','_FILES']){
$tmp[$key] = $value;
}else{
continue;
}
}
echo '<pre>';
print_r($tmp);
?>
0 Comments