How would one go about echoing a variable multiple times..
A way to understand this question better would be if I said:
$foo = '<div>bar</div>';
echo $foo*7;
It's probably the most simple thing, but I'm not sure.
And
How would one go about echoing a variable multiple times..
A way to understand this question better would be if I said:
$foo = '<div>bar</div>';
echo $foo*7;
It's probably the most simple thing, but I'm not sure.
And
In this simple case, you can use str_repeat()
.
$foo = '<div>bar</div>';
echo str_repeat($foo, 7);
Reference: PHP string functions
For anything more complex, a loop is usually the way to go.