public static function getMonthLabelPrice($monthlyDay) { $date = new DateTime('now'); $date->modify('first day of this month'); $startdate = $date->format('Y-m-d') . ' 00:00:00'; $date->modify('first day of next month'); $enddate = $date->format('Y-m-d') . ' 00:00:00'; $days = explode(', ', $monthlyDay); $price = ''; $prefix = ''; foreach ($days as $day) { $dayPrice = ceil(DigiComHelperChart::getAmountDaily($day)); $price = $price . $prefix . $dayPrice; $prefix = ', '; } return $price; }