Handle order dependence in loops
- by Matt
Hey all,
I'm making a templating system where I instantiate each tag using a foreach loop. The issue is that some of the tags rely on each other so, I'm wondering how to get around that ordering from the looping.
Here's an example:
Class A {
public $width;
__construct() {
$this->width = $B->width; // Undefined! Or atleast not set…