Hey guys its my first question here I think.
So I'm using MyBB Forum software.
I have a PHP code that fetches some data from a database no issues in there its working properly.
$query = $db->query("SELECT * FROM housing");
while($result = $db->fetch_array($query))
{
$housingvar .= "<td>". $result['username']. "</td>";
$price .= "<td>". $result['Price']. "</td>";
$city .= "<td>". $result['City']. "</td>";
$tax .= "<td>". $result['Tax']. "</td>";
$adrz .= "<td>". $result['Adress']. "</td>";
}
This is the code. I'm using. These variables are then plugged in an HTML table on the forum but everything is in the same column and I dont know how to make a new row for every data. I'm sure this is possible but dont know how.
I cant use echo in my PHP code either. Since I'm using these variables in a pure HTML template.
<tr>
{$housingvar}
{$price}
{$city}
{$adrz}
{$tax}
</tr>