I want to keep my code clean and tidy, but im running into a problem.
Lets say i have this very simple code:
$stringx = $stringy . "there";
$stringy = "hello";
echo $stringx;
Off course the result will be: 'there'
But is there a way that i can have it say 'hellothere'?
in other words, that $stringx is updated before its echoed?
without swapping the 2 lines? The problem is that $stringx is very long, and created much earlier, but has to have a variable in it.
a bit hard to explain i think 🙂
maybe another example helps.
$string = "this is the " . $i . " time you see this line";
While (true) {
$i++;
echo $string;
}
thnx!!