Hi there
MuToGeN wrote:
> No, arrays can be passed (<input name="array[2]">,
> for example), but not objects.
And why does this work then?
=== SCRIPT ===
<?php
error_reporting(E_ALL);
class AClass {
var $i = 0;
function AClass ($i = 0) {
//$this->display();
}
function increment() {
$this->i++;
}
function display() {
printf('Current value of $i is: %s<br>', $this->i);
}
}
session_start();
if (!isset($_SESSION['AClass'])) {
$a = & new AClass();
$_SESSION['AClass'] = & $a;
}
else {
$a = & $_SESSION['AClass'];
}
$a->increment();
$a->display();
?>
=== /SCRIPT ===
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php