$str = file_get_contents("http://183.82.96.238:8183/api/sevas/GetSevasTimeSlots"); $sevas = json_decode($str); //var_dump($sevas); $sevas_list = $sevas->SevaDetails; $stot = count($sevas_list); $seva_slots=array(); /* {"SevaDetails":[{"SevaId":10,"SevaName":"Bilwarchana (At Sri Vrudha Mallikarjunaswamy)","Rate":2500.00,"SevaDetails":"Bilwarchana (At Sri Vrudha Mallikarjunaswamy) (2500.00) - 07:30 am to 01:00 pm","TimeSlotID":48,"TimeSlot":"07:30 am to 01:00 pm"},{"SevaId":9,"SevaName":"Bilwarchana -In Garbhalayam","Rate":5000.00,"SevaDetails":"Bilwarchana -In Garbhalayam (5000.00) - 07.00 A.M to 08.00 A.M","TimeSlotID":1,"TimeSlot":"07.00 A.M to 08.00 A.M"},{"SevaId":9,"SevaName":"Bilwarchana -In Garbhalayam","Rate":5000.00,"SevaDetails":"Bilwarchana -In Garbhalayam (5000.00) - 07:30 am to 01:00 pm","TimeSlotID":48,"TimeSlot":"07:30 am to 01:00 pm"},{"SevaId":4,"SevaName":"Ekantha Seva","Rate":120.00,"SevaDetails":"Ekantha Seva (120.00) - 09:45 pm","TimeSlotID":49,"TimeSlot":"09:45 pm"},{"SevaId":19,"SevaName":"Gopuja","Rate":120.00,"SevaDetails":"Gopuja (120.00) - 06:30 am to 11:00 am","TimeSlotID":47,"TimeSlot":"06:30 am to 11:00 am"},{"SevaId":11,"SevaName":"Kunkumarchana","Rate":1000.00,"SevaDetails":"Kunkumarchana (1000.00) - 06:00 am to 01:00 pm","TimeSlotID":50,"TimeSlot":"06:00 am to 01:00 pm"},{"SevaId":11,"SevaName":"Kunkumarchana","Rate":1000.00,"SevaDetails":"Kunkumarchana (1000.00) - 06:30 pm to 08:30 pm","TimeSlotID":51,"TimeSlot":"06:30 pm to 08:30 pm"},{"SevaId":43,"SevaName":"Lalitha Sahasranamam","Rate":500.00,"SevaDetails":"Lalitha Sahasranamam (500.00) - 06.30 A.M","TimeSlotID":17,"TimeSlot":"06.30 A.M"},{"SevaId":2,"SevaName":"Mahamangala Harathi","Rate":500.00,"SevaDetails":"Mahamangala Harathi (500.00) - 08.00 A.M to 09.00 A.M","TimeSlotID":2,"TimeSlot":"08.00 A.M to 09.00 A.M"},{"SevaId":2,"SevaName":"Mahamangala Harathi","Rate":500.00,"SevaDetails":"Mahamangala Harathi (500.00) - 06.00 A.M","TimeSlotID":22,"TimeSlot":"06.00 A.M"},{"SevaId":2,"SevaName":"Mahamangala Harathi","Rate":500.00,"SevaDetails":"Mahamangala Harathi (500.00) - 05.00 A.M","TimeSlotID":23,"TimeSlot":"05.00 A.M"},{"SevaId":2,"SevaName":"Mahamangala Harathi","Rate":500.00,"SevaDetails":"Mahamangala Harathi (500.00) - 05.20 P.M","TimeSlotID":25,"TimeSlot":"05.20 P.M"},{"SevaId":6,"SevaName":"Pallaki Seva","Rate":220.00,"SevaDetails":"Pallaki Seva (220.00) - 07.00 P.M","TimeSlotID":18,"TimeSlot":"07.00 P.M"},{"SevaId":61,"SevaName":"Seva11","Rate":123.00,"SevaDetails":"Seva11 (123.00) - 08.00 A.M to 09.00 A.M","TimeSlotID":2,"TimeSlot":"08.00 A.M to 09.00 A.M"},{"SevaId":3,"SevaName":"Suprabhata Seva","Rate":500.00,"SevaDetails":"Suprabhata Seva (500.00) - 05.00 A.M","TimeSlotID":23,"TimeSlot":"05.00 A.M"},{"SevaId":3,"SevaName":"Suprabhata Seva","Rate":500.00,"SevaDetails":"Suprabhata Seva (500.00) - 04:00 am","TimeSlotID":53,"TimeSlot":"04:00 am"},{"SevaId":5,"SevaName":"Vendi Vaahana Seva ","Rate":520.00,"SevaDetails":"Vendi Vaahana Seva (520.00) - 07.00 P.M","TimeSlotID":18,"TimeSlot":"07.00 P.M"}]} */ ?>