I want to output my code. When I use return then it breaks up after 1time and
(when I use echo my content will be displayed on the top of the page. And I think that I should not use here echo because I want to call functions in the loop later)
Here are pictures that will show how it looks like:
My code with return:
function allmyshortcodesloopfunction() {
$alltheshortcodes = '';
$alltheshortcodes = 'thistextshouldbehere4times';
for($i=0; $i < 4; $i++) {
echo '<p></p>';
return $alltheshortcodes;
}
}
How this looks: enter image description here
how it looks with echo: enter image description here
Maybe you can post a Thread which I could not find to solve this problem. Some Tags for People in the future with this problem. That they can find this: loop, while, if, return, statement, content, breaks up, just one time, only 1 time