I have this echo, however I'm unsure how I'd style the echo with for instance a tag. I'd appreciate some examples.
echo $lastpireps['landingrate'];
Additionally, is there anyway of styling this echo through a css file?
你可以这样做:
<div class="foo"><?php echo $lastpireps['landingrate']; ?></div>
或这个:
echo '<div class="foo">' . $lastpireps['landingrate'] . '</div>';
.foo
然后像往常一样在你的CSS中设置样式。
有成千上万种方法。这是一个。
如果您处于 php 代码的块/循环中
echo "<div class='myclass'>".$lastpireps['landingrate']."</div>";
在 CSS 中
.myclass {}