I want to change value of variable that was called before but should be changed after it. Like in this exapmle:
<img src="<?php echo $src; ?>" />
$src = 'some_src.jpg';
Maybe some kind of buffering or something? That should be done this way, cause I'm trying to make a kind of template engine:
$this->showHeader();
$this->showBody();
But the body is in another file. In this file i would call:
$this->header->setScript('somescript.js');
And that should change variables in header. But I can't call showBody() function before showHeader(). Sorry for my english. :(