开发者

Echoing Spaces Between a Hard-Coded Word and a Variable

开发者 https://www.devze.com 2022-12-30 03:17 出处:网络
For the code below, how could I put 5 spaces between \"Submissions:\" and $row1[\"countSubmissions\"] ?

For the code below, how could I put 5 spaces between "Submissions:" and $row1["countSubmissions"] ?

Thanks in advance,

John

开发者_如何学编程
echo '<td class="sitename5">Submissions: '.$row1["countSubmissions"].'</td>';


&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

Example:

echo '<td class="sitename5">Submissions: &nbsp;&nbsp;&nbsp;&nbsp;'.$row1["countSubmissions"].'</td>';


Use CSS - what you are probably doing belongs into the presentation layer.


Look at the PHP function str_repeat

You might also consider the CSS property word-spacing, which may be a better way to accomplish what you seem to be attempting.

0

精彩评论

暂无评论...
验证码 换一张
取 消