note 20338 added to function.wddx-serialize-vars

From: Date: Sun, 31 Mar 2002 03:45:24 +0000
Subject: note 20338 added to function.wddx-serialize-vars
Groups: php.notes 
Request: Send a blank email to php-notes+get-28420@lists.php.net to get a copy of this message
You can use globals to get around the above in classes: <?php class Test { var $str; var $wddx; function Test() { $this->str = "test"; $this->wddx_serialize($this->str); header('Content-Type: text/xml'); echo ($this->wddx); } function wddx_serialize($var) { global $wddxtemp; unset($wddxtemp); $wddxtemp = $var; $this->wddx = wddx_serialize_vars("wddxtemp"); } } new Test(); ?> -terry -- http://www.php.net/manual/en/function.wddx-serialize-vars.php http://master.php.net/manage/user-notes.php?action=edit+20338 http://master.php.net/manage/user-notes.php?action=delete+20338 http://master.php.net/manage/user-notes.php?action=reject+20338

« previous php.notes (#28420) next »