因此,我只是通過PHP語句構建了一個表,但我不確定如何添加border="1"
屬性,因爲這會破壞echo語句並導致編譯錯誤。在echo語句中向表中添加「border」
這裏是我的代碼,是的,它看起來很嚇人這種格式,但我只需要給表格一個border
標籤莫名其妙。
echo
"<table><tr>
<th></th>
<th>A</th>
<th>B</th>
<th>AB</th>
<th>O</th>
</tr><tr>
<th>N</th>
<th>" . $ATypeN . "</th>
<th>" . $BTypeN . "</th>
<th>" . $ABTypeN . "</th>
<th>" . $OTypeN . "</th>
<th>".
"</tr><tr>
<th>Y</th>
<th>" . $ATypeY . "</th>
<th>" . $BTypeY . "</th>
<th>" . $ABTypeY . "</th>
<th>" . $OTypeY . "</th>
</tr>
</table>";
我也將顯示定界符,因爲這將是最好的OP的當前代碼。 – Jessica
另外值得指出的是,你不需要連接像'
@SetSailMedia謝謝!我覺得很愚蠢,我甚至沒有考慮過PHP中的轉義字符。 :)當計時器啓動時,我會將其標記爲答案! – Austin