$push = $result; $push = json_decode($push, true); foreach ($push['rows'] as $item) { echo $item['ad_campaign_id'] . ','; } only numbers
<?php $push = $result; $push = json_decode($push, true); foreach ($push['rows'] as $item) { echo $item['ad_campaign_id'] . ','; }