【发布时间】:2019-11-01 16:24:36
【问题描述】:
我想输出我的代码。当我使用 return 时,它会在 1 次后分解并
(当我使用echo时,我的内容将显示在页面顶部。我认为我不应该在这里使用echo,因为我想稍后在循环中调用函数)
以下是展示其外观的图片:
我的返回代码:
function allmyshortcodesloopfunction() {
$alltheshortcodes = '';
$alltheshortcodes = 'thistextshouldbehere4times';
for($i=0; $i < 4; $i++) {
echo '<p></p>';
return $alltheshortcodes;
}
}
这看起来如何: enter image description here
echo 的样子:enter image description here
也许你可以发布一个我找不到的主题来解决这个问题。 未来有这个问题的人的一些标签。他们可以找到这个: 循环、while、if、return、statement、content、breaks,一次,一次
【问题讨论】: