Hello,
I am new to php and stuck on this msqli function.
I would like to echo out all the results divided by commas and apostrophe. Example: "23232","324231","342533"
With the last one not having a comma.
Here is what I came up with and not sure why I am getting errors.
I think this is the issue but not sure: $list.= $result->'"'.video_code.'",';
Thanks.
$sql = 'SELECT video_code FROM yt_videos WHERE yt_video_item_id="'.$vidid.'" ORDER BY RAND() LIMIT 10';
$query = mysqli_query($db_conx, $sql);
$list='';
while ($result = $query ->fetch_object()) {
$list.= $result->'"'.video_code.'",';
}
echo $list=substr($list,0,-1);