1

hello guys. why i cloud to access . when i want to access the file id like blow:

echo $row['id'];

i have to do this blow:

echo $row[0];

{the number of the field} ?? some times it ok ??

i use this code for get data from DB :

$result = mysqli_query($con,"SELECT * FROM members WHERE id=".$number."");
$num=mysqli_num_rows($result);  
$row=mysqli_fetch_row($result);
andrew
  • 9,313
  • 7
  • 30
  • 61

1 Answers1

0

I have same problem long time ago.

you must use "mysqli_fetch_array($result)" instead of using "mysqli_fetch_row($result)"

sadegh
  • 43
  • 3
  • 12