note 30400 deleted from function.reset by betz

From: Date: Mon, 13 Sep 2004 16:41:12 +0000
Subject: note 30400 deleted from function.reset by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-76619@lists.php.net to get a copy of this message
Note Submitter: gearond at cvc dot net ---- reset does not seem to work inside of a function. The interpreter doesn't seem to want to wait until the second pass to do an error message, it chokes on the function definition, AFAICT. . Example, to clear a form made from a Smarty template where each form element has value="{$element_name}" in it, and you have all the element names in an array, do this: . function clr_tpl_vals( &$smarty_object, &$arr_var_names ){ ....reset $arr_var_names; ....foreach( $arr_var_names as $name ) { ........$smarty_object->assign( $name, ''); ....} } . unfortunately, the interpreter chokes on the reset line.

« previous php.notes (#76619) next »