-1

これは少し曖昧に聞こえるかもしれませんが、HTML の行内に MySQL データベースの変数を配置しようとしています。現在、次のようになっています。

こんにちは.

以下は私が使用しているコードです。ありがとう!

echo "<table border='1'>";
echo "<tr> <th>Helo</th> <th>Class</th> <th>Need</th> </tr>";
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $result )) {
    // Print out the contents of each row into a table
    echo "<tr><td>"; 
    echo $row['Icon'];
    echo "</td><td>"; 
    echo $row['Class'];
    echo "</td><td>"; 
    echo $row['Need'];
    echo "</td></tr>"; 
} 

echo "</table>";
?>
4

1 に答える 1

3

試す:

echo '<img src="'.$row['Helo'].'" title="'.$row['Class'].'">';
于 2013-01-18T23:15:24.703 に答える