What I’m trying to do is to get this line:
'video_play_price_user' => number_format($video->video_play_price?$video->video_play_price:$config['video_play_price'],2)
to work with this array, but something is wrong:
if (!empty($get_videos)) {
$len = count($get_videos);
foreach ($get_videos as $key => $video) {
$video = PT_GetVideoByID($video, 0, 0, 0);
$pt->last_video = false;
if ($key == $len - 1) {
$pt->last_video = true;
}
$final .= PT_LoadPage('search/list', array(
'ID' => $video->id,
'USER_DATA' => $video->owner,
'THUMBNAIL' => $video->thumbnail,
'URL' => $video->url,
'TITLE' => $video->title,
'DESC' => $video->markup_description,
'VIEWS' => $video->views,
'VIEWS_NUM' => number_format($video->views),
'TIME' => $video->time_ago,
'DURATION' => $video->duration,
'PRICE' => $video_play_price_user,
'video_play_price_user' => number_format($video->video_play_price?$video->video_play_price:$config['video_play_price'],2)
));
}
}
Any guidance will be appreciated