php - convert std object class to comma seperated string -
i have std class object twitter , take ids array values , put them in php variable $ids $ids = (15761916,30144785,382747195,19399719)
.
i imagine using loop , using phps implode i'm not sure how go it.
stdclass object ( [ids] => array ( [0] => 15761916 [1] => 30144785 [2] => 382747195 [3] => 19399719 ) [next_cursor] => 0 [next_cursor_str] => 0 [previous_cursor] => 0 [previous_cursor_str] => 0 )
$ids = "(" . implode(",", $object->ids) . ")";
Comments
Post a Comment