Answer the question
In order to leave comments, you need to log in
How to output the data in the first array from the second?
first array:
$sql = "SELECT * FROM video WHERE network_id = ".intval($network['NID'])." AND active ='1' ORDER BY addtime DESC LIMIT ".$config['networkvideo_per_page'];
$rs=$conn->execute($sql);
$videos = $rs->getrows();
$active = ( $config['approve'] == '1' ) ? " AND v.active = '1'" : NULL;
$sql = "SELECT *
FROM video WHERE VID = " .$vid. .$active. " LIMIT 1";
$rs = $conn->execute($sql);
$video = $rs->getrows();
$video = $video['0'];
$formats = explode(',', $video['formats']);
foreach ($formats as $key => $value) {
unset($f);
$f = explode('.', $value);
$vf[$key]['height'] = $f[0];
$vf[$key]['label'] = $f[1];
$vf[$key]['format'] = $f[2];
$vf[$key]['file'] = $video['VID']."_".$vf[$key]['label'].".".$vf[$key]['format'];
}
$video['files'] = $vf;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question