I am getting the error: Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' on line 28.

Here is my code:

<?php
/* Program: mysql_up.php
* Desc: Connects to MySQL Server and
* outputs settings.
*/
echo "<html>
<head><title>Test MySQL</title></head>
<body>";
$host="localhost";
$user="root";
$password="";
$cxn = mysqli_connect($host,$user,$password);
$sql="SHOW STATUS";
$result = mysqli_query($cxn,$sql);
if($result == false)
{
echo "<h4>Error: ".mysqli_error($cxn)."</h4>";
}
else
{
/* Table that displays the results */
echo "<table border='1'>
<tr><th>Variable_name</th>
<th>Value</th></tr>";
for($i = 0; $i < mysqli_num_rows($result); $i++)
{
echo '<tr'
$row_array = mysqli_fetch_row ($result);
for($j = 0;$j < mysqli_num_fields($result);$j++)
{
echo '<td'.$row_array[$j].'<td\n';
}
}
echo '</table>';
}
php?>
</body></html>

I have had many other errors in this code which I beleive I have fixed, but I'm stuck on this one. Any help would be great, thanks.

     echo '<tr'

    No semicolon 😉

    Welcome to PHPBuilder! 🙂

    EDIT: Also, looks like you'll have a lot of HTML tags that don't close ... or am I too tired to see straight on that?

      First off Thank You. Im on other sites and everyone just being d***s even though I'm posting in the newbie sections.

      But I myself did not write this code, a friend did and told me to try it, so I am. yes there are a bunch of open HTML tags that I have to fix. I'm going to try the semicolon though.

        That was it!! Thanks, I will be coming to this site for now on

          You're welcome. Read some of the posts linked in my .sig and you'll have a pretty good idea how to stay on people's good sides. And, again, welcome to PHPBuilder 🙂

            Also, don't forget to mark this thread resolved using the links on the Thread Tools menu above.

              good idea putting those links in your sig. I checked them quickly but will read them thourughly tom. Thank you

                Write a Reply...