How to display data in the first array from the second?

the 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();


second:
$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;

in the first array displays the list of videos, the second the name of the video that need to insert in first array. $vid shared variable.
April 3rd 20 at 17:32
0 answer

Find more questions by tags PHPArrays