I wrote this code and when I run the page I get the parse error :-
Parse error: syntax error, unexpected '[' in C:\xampp\htdocs\view.php on line 30
my code is :-
i checked my whole code, i was unable to find the error
<?php
$page_title="View Users";
include("header.html");
include("nav.html");
?>
<div id="content">
<?php
$num=
require_once("connect.php");
$q="SELECT first_name, last_name, user_id FROM users";
$r=mysql_query($q,$dbc);
$num=mysql_num_rows($r);
echo "<center>Total no. of users registered : ".$num."<br /><br /></center>";
if($r)
{
echo '<table align="center" border="2" cellspacing="3" cellpadding="3" width="100%">
<tr><td align="left"><b>Edit</b></td>
<td align="left"><b>Delete</b></td>
<td align="left"><b>ID</b></td>
<td align="left"><b>First Name</b></td>
<td align="Left"><b>Last Name</b></td>
</tr>';
while($row=mysql_fetch_array($r,MYSQL_ASSOC))
{
echo '<tr>
<td align="center"><a href="edit.php?id="'.$row['user_id'].'>Edit</a></td>'.
'<td align="center"><a href="delete.php?id="'.$row['user_id'].'Delete</a></td>'.
'<td align="center">'.$row['user_id'].'</td>'.
'<td align="left">'.$row['first_name'].'</td>'.
'<td align="center">'.$row.['last_name'].'</td>'.
'</tr>';
}
echo '</table>';
}
mysql_free_result($r);
?>
</div>
<?php
include("footer.html");
?>