开发者

Echoing Spaces Between a Hard-Coded Word and a Variable

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜