Jump to content

I am trying to print arry from database and the first object is not printing.


i73

Recommended Posts

$video_query = mysql_query(
"SELECT video_name FROM  video");
$video_info = mysql_fetch_array($video_query);
while($video_info=mysql_fetch_array($video_query)){	


$video_name=$video_info['video_name'];
}

I don't know why but It wont print the first thing in the array...

 

Try,

$video_query = mysql_query(
"SELECT video_name FROM  video");
//$video_info = mysql_fetch_array($video_query);
while($video_info=mysql_fetch_array($video_query)){	


$video_name=$video_info['video_name'];
}

Use mysql_error() to check for actual errors as well.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.