1
   '<ul id="size" class="nav navbar-nav navbar-right">'.  
   '<li><a href="#">'. $name = $dbc->query("select Name from jobseeker where Email = '$email'")->fetch_row()[0] .'</a></li>' .

   '<li><a href="Logout.php"><span class="glyphicon glyphicon-log-in"> </span>Logout</a></li>
   </ul>'

I always get the Parse error: syntax error, unexpected '[', expecting ',' or ';' when I open it in the uploaded website but it works fine when I open it in the localhost.

I think the operator -> is causing this error and I dont know how to edit it out. Is there any alternative to this line?

 $name = $dbc->query("select Name from jobseeker where Email = '$email'")->fetch_row()[0]

0 Answers0