Hey guys, I have some images and videos that I want to print out from the database from the, most views, most comments etc where the top values would be at the top of the array when output.
I have never fully grasped arrays while learning, just trying to figure out how to do this.
$video_array=array($video_info3['video_id']);
foreach($video_array as $x=>$x_value)
{
echo $x . ", Value=" . $x_value;
echo "<br>";
}
I was thinking something like that... But it wont output from the database. Also is this the best way to call values from the database?
$video_info="SELECT * from video where video_id=$video_id";
$video_info2=mysql_query($video_info) or die("could not select video directory");
$video_info3=mysql_fetch_array($video_info2);
$video_info3['variables'];
Thanks in advance, I hope you can help