I want to remove the last record comma from fetched value. I used $album1 = substr($album,0,-1);
to remove last character comma from the value `$ album'. I caught:
SyntaxError: Unexpected token ,'
Whats wrong with this in substr()
?
$album = {"media_type":"image/png","pic_id":"zhadb"},
{"media_type":"image/png","pic_id":"zhadb"},
{"media_type":"image/video","pic_id":"kg5k4"},
while($fet_pic=mysql_fetch_array($albpic)) {
$album.=$fet_pic['CONTENT_VALUE'].',';
}
$album1 = substr($album,0,-1);