References

From: Date: Sun, 13 May 2001 05:43:57 +0000
Subject: References
Groups: php.general 
Request: Send a blank email to php-general+get-52612@lists.php.net to get a copy of this message
Hello all, My apologies if this is has been answered before or if this is considered beginner material...but I am trying to make something of a linked list using PHP. However, with the absence of pointers, I'm wondering if references will do the trick. For example: ///////////////////////////////////////////////////////////////////////// class node { var value; var child; var parent; } $top = new node(); $top->value = "hello"; $test = new node(); $top->child = &$test; $test->parent = &$top; ///////////////////////////////////////////////////////////////////////// Has anyone attempted anything like this before or can anyone think of a reason that this will not work? Thank you! - Steve

« previous php.general (#52612) next »