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



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to