<?php
mysql_connect("localhost","root","");
mysql_select_db("rohan");
$s="select * from black";
$resource=mysql_query($s);
$row = mysql_fetch_row($resource);
echo "ID: ".row[0]."<br>";
echo "Name: ".row[1]." ".row[2]."<br>";
echo "E-mail: ".row[3]."<br>";
echo "country: ".row[4]."<br>";
echo "salary: ".row[5]."<br>";
I can't connect to my database with this code. It gives me this error.
Parse error: syntax error, unexpected '[', expecting ',' or ';' in C:\xampp\xampp\htdocs\rohan\mysql_fetch_row.php on line 9
What is the problem?