note 104663 deleted from function.session-register by cmb
| From: | cmb@php.net | Date: | Wed, 24 Feb 2021 12:10:54 +0000 |
| Subject: | note 104663 deleted from function.session-register by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-219177@lists.php.net to get a copy of this message | ||
Note Submitter: klein at sup4u dot de
----
in addition to function set_session_vars instead of replacing all $var with
$_SESSION['var'],
you could get all set session-vars in prevoius scripts with this function
<?php
function get_session_vars() {
$nb_args=func_num_args();
$arg_list=func_get_args();
for($i=0;$i<$nb_args;$i++) {
global $$arg_list[$i] = $_SESSION[$arg_list[$i]];
}
}
?>