1 回答
TA贡献1906条经验 获得超10个赞
您可以使用 .= 赋值运算符将结果值相互连接
foreach ($closures as $closure) {
//stuff
for ( $i = 0; $i < $count; $i++){
$vcount = count( $locations[$i] );
// initiate the result
$result = "";
while ( $vcount < 2 ) {
// concatinate the value to $result
$result .= "The ".$venue[$i]." has been reserved for an <a href=".$eventURLs[$i].">event</a> today from ".$startTime[$i]." - ".$endTime[$i].".<br>";
//print_r($result); //looks good printed...
break;
}
while ($vcount > 1 ) {
// concatinate the value to $result again
$result .= "The ".$venue[$i]."s have been reserved for an <a href=".$eventURLs[$i].">event</a> today from ".$startTime[$i]." - ".$endTime[$i].".<br>";
//print_r($result); //looks good printed...
break;
}
}
return $result;
break;
}
- 1 回答
- 0 关注
- 164 浏览
添加回答
举报