简体   繁体   English

如何使php中的html表内部回显正常竞赛

[英]How to make inside html table in php echo a normal contest

Well what i want to what is to add here 好吧,我想在这里添加什么

    echo "<td>" . $row["seller"] . "</td>";

I want to make it like this 我要这样

echo "<td>" Seller : . $row["seller"] . "</td>";

But this gives me an error , how to correctly write it 但这给我一个错误,如何正确编写它

Like the resultat be like 像结果一样

Seller : and the value of the $row 卖方: 和$ row的价值

You can just do it like this: 您可以这样做:

 echo "<td> Seller: ". $row["seller"] . "</td>";

strings go inside "" in PHP. 字符串在PHP中放入""内。

Or you can do it like this: 或者您可以这样做:

 echo '<td> Seller: '. $row["seller"] . '</td>';

'' will transform anything inside it to their HTML equivalent since "" treats everything inside it as a string. ''将改变里面任何东西到他们的HTML等同,因为""对待里面的一切它作为一个字符串。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM