Other than reversing the order of variable names when you initially define it, I don't see any simple solution -- and at least in this trivial example don't see why you would want to. I guess that's part of the problem for me here: I don't understand "why", and thus I'm not sure what would be the best solution (if there is one).
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
I am apply for a position this is one of the bonus questions I figure it would help my chances at the position. they want it solved using a recursive function, reverse a link list. Anyway if you can help that would be awesome
This is what I have:
I maybe way off so be warned
$lot = new stdClass;
$lot->a = new stdClass;
$lot->a->b = new stdClass;
$lot->a->b->c = new stdClass;
$lot->a->b->c->d = new stdClass;
function reverseList($orgL, $step=0, $refArr=array(), $tranL=NULL, $pointer=NULL, $newL=NULL, $objArr=array())