想要从3D数组中删除方括号

时间:2016-02-03 10:13:37

标签: php arrays json

以下是我的数组的结构。由于某种原因,我不能删除方括号,我也尝试过arr [0]但仍然无法正常工作。请帮帮我。

{
       "status":"true",
       "schedule":[
          {
             "id":"6",
             "day":"Sat",
             "date":"2016-03-19",
             "ImageUrl":"http:\/\/gamet2016.in\/xelcms\/uploads\/schedule\/",
             "time_slots":[
                {
                   "time":[
                      "09:00 \u2013 10:35 am"
                   ],
                   "schedule_timeslot":[
                      {
                         "id":"8",
                         "date":"2016-03-19",
                         "time":"09:00 \u2013 10:35 am ",
                         "stime":"09:00 - 9:15 am",
                         "mtname":"Asymptomatic elevated blood pressure in the ED",
                         "venue":"ITC Grand Chola",
                         "image":"2018052125_grand-chola-05.jpg",
                         "description1":"<p>\r\n\tN\/A<\/p>\r\n",
                         "description":"<p>\r\n\tAsymptomatic elevated blood pressure in the ED<\/p>\r\n"
                      },
                      {
                         "id":"9",
                         "date":"2016-03-19",
                         "time":"09:00 \u2013 10:35 am ",
                         "stime":"09:20 -9:35 am",
                         "mtname":"Paracetamol overdose - Are we dosing it right?",
                         "venue":"ITC Grand Chola",
                         "image":"1515598022_grand-chola-05.jpg",
                         "description1":"<p>\r\n\tN\/A<\/p>\r\n",
                         "description":"<p>\r\n\tParacetamol overdose - Are we dosing it right?<\/p>\r\n"
                      },
                      {
                         "id":"10",
                         "date":"2016-03-19",
                         "time":"09:00 \u2013 10:35 am ",
                         "stime":"09:40 -9:55 am",
                         "mtname":"Risk score to rule out MI - What works best?",
                         "venue":"ITC Grand Chola",
                         "image":"621260488_grand-chola-05.jpg",
                         "description1":"<p>\r\n\tN\/A<\/p>\r\n",
                         "description":"<p>\r\n\tRisk score to rule out MI - What works best?<\/p>\r\n"
                      },
                      {
                         "id":"11",
                         "date":"2016-03-19",
                         "time":"09:00 \u2013 10:35 am ",
                         "stime":"10:00 -10:15 am",
                         "mtname":"Choosing the right antiepileptic drug - pearls and pitfalls",
                         "venue":"ITC Grand Chola",
                         "image":"405601595_grand-chola-05.jpg",
                         "description1":"<p>\r\n\tN\/A<\/p>\r\n",
                         "description":"<p>\r\n\tChoosing the right antiepileptic drug - pearls and pitfalls<\/p>\r\n"
                      },
                      {
                         "id":"12",
                         "date":"2016-03-19",
                         "time":"09:00 \u2013 10:35 am",
                         "stime":"10:20 -10:35 am",
                         "mtname":"Updated guidelines for the management of STIs",
                         "venue":"ITC Grand Chola",
                         "image":"960820281_grand-chola-05.jpg",
                         "description1":"<p>\r\n\tN\/A<\/p>\r\n",
                         "description":"<p>\r\n\tUpdated guidelines for the management of STIs<\/p>\r\n"
                      }
                   ]
                },
                {
                   "time":[
                      "10:35 - 10:50 am"
                   ],
                   "schedule_timeslot":[
                      {
                         "id":"13",
                         "date":"2016-03-19",
                         "time":"10:35 - 10:50 am",
                         "stime":"10:35 -10:50 am",
                         "mtname":"Tea Break",
                         "venue":"ITC Grand Chola",
                         "image":"",
                         "description1":"<p>\r\n\tN\/A<\/p>\r\n",
                         "description":"<p>\r\n\tTea Break<\/p>\r\n"
                      }
                   ]
                },
                {
                   "time":[
                      "10:55 - 11:30 am"
                   ],
                   "schedule_timeslot":[
                      {
                         "id":"14",
                         "date":"2016-03-19",
                         "time":"10:55 - 11:30 am",
                         "stime":"10:55 - 11:30 am",
                         "mtname":"World perspective on EM - Africa, Europe & Canada",
                         "venue":"ITC Grand Chola",
                         "image":"",
                         "description1":"<p>\r\n\tN\/A<\/p>\r\n",
                         "description":"<p>\r\n\tWorld perspective on EM - Africa, Europe &amp; Canada<\/p>\r\n"
                      }
                   ]
                },
                {
                   "time":[
                      "11:30 - 1:05 pm"
                   ],
                   "schedule_timeslot":[
                      {
                         "id":"15",
                         "date":"2016-03-19",
                         "time":"11:30 - 1:05 pm",
                         "stime":"11:30 - 11:45 am",
                         "mtname":"Lessons learnt from recent disasters",
                         "venue":"ITC Grand Chola",
                         "image":"529413681_44650312.jpg",
                         "description1":"<p>\r\n\tN\/A<\/p>\r\n",
                         "description":"<p>\r\n\tLessons learnt from recent disasters<\/p>\r\n"
                      },
                      {
                         "id":"16",
                         "date":"2016-03-19",
                         "time":"11:30 - 1:05 pm",
                         "stime":"11:50 - 12:05 pm",
                         "mtname":"Earthquake - the nepal experience",
                         "venue":"ITC Grand Chola",
                         "image":"66198109_44650312.jpg",
                         "description1":"<p>\r\n\tN\/A<\/p>\r\n",
                         "description":"<p>\r\n\tEarthquake - the nepal experience<\/p>\r\n"
                      },
                      {
                         "id":"17",
                         "date":"2016-03-19",
                         "time":"11:30 - 1:05 pm",
                         "stime":"12:10 - 12:25 pm",
                         "mtname":"The Chennai floods",
                         "venue":"ITC Grand Chola",
                         "image":"1224346060_44650312.jpg",
                         "description1":"<p>\r\n\tN\/A<\/p>\r\n",
                         "description":"<p>\r\n\tThe Chennai floods<\/p>\r\n"
                      },
                      {
                         "id":"18",
                         "date":"2016-03-19",
                         "time":"11:30 - 1:05 pm",
                         "stime":"12:30 - 12:45 pm",
                         "mtname":"Supporting a disaster struck region - Small steps",
                         "venue":"ITC Grand Chola",
                         "image":"767987454_44650312.jpg",
                         "description1":"<p>\r\n\tN\/A<\/p>\r\n",
                         "description":"<p>\r\n\tSupporting a disaster struck region - Small steps<\/p>\r\n"
                      },
                      {
                         "id":"19",
                         "date":"2016-03-19",
                         "time":"11:30 - 1:05 pm",
                         "stime":"12:50 - 01:05 pm",
                         "mtname":"Disaster management - Learning the right lessons",
                         "venue":"ITC Grand Chola",
                         "image":"207539985_44650312.jpg",
                         "description1":"<p>\r\n\tN\/A<\/p>\r\n",
                         "description":"<p>\r\n\tDisaster management - Learning the right lessons<\/p>\r\n"
                      }
                   ]
                },
                {
                   "time":[
                      "01:05 - 02:00 pm"
                   ],
                   "schedule_timeslot":[
                      {
                         "id":"20",
                         "date":"2016-03-19",
                         "time":"01:05 - 02:00 pm",
                         "stime":"01:05 - 0:2:00 pm",
                         "mtname":"Lunch",
                         "venue":"ITC Grand Chola",
                         "image":"",
                         "description1":"<p>\r\n\tN\/A<\/p>\r\n",
                         "description":"<p>\r\n\tLunch<\/p>\r\n"
                      }
                   ]
                },
                {
                   "time":[
                      "02:00 - 03:35 pm"
                   ],
                   "schedule_timeslot":[
                      {
                         "id":"21",
                         "date":"2016-03-19",
                         "time":"02:00 - 03:35 pm ",
                         "stime":"02:00 - 02:15 pm",
                         "mtname":"Buffered Crystalloids (RL) vs. Isotonic Saline in Resuscitation",
                         "venue":"ITC Grand Chola",
                         "image":"51267995_01-Exterior-Dusk_1_lg (1).jpg",
                         "description1":"<p>\r\n\tN\/A<\/p>\r\n",
                         "description":"<p>\r\n\tBuffered Crystalloids (RL) vs. Isotonic Saline in Resuscitation<\/p>\r\n"
                      },
                      {
                         "id":"22",
                         "date":"2016-03-19",
                         "time":"02:00 - 03:35 pm",
                         "stime":"02:20 - 02:35 pm",
                         "mtname":"Cross-reactivity between penicillins & carbepenems",
                         "venue":"ITC Grand Chola",
                         "image":"1406941061_01-Exterior-Dusk_1_lg (1).jpg",
                         "description1":"            <p>\r\n\tN\/A<\/p>\r\n            ",
                         "description":"           <p>\r\n\tCross-reactivity between penicillins & carbepenems<\/p>\r\n            "
                      },
                      {
                         "id":"23",
                         "date":"2016-03-19",
                         "time":"02:00 - 03:35 pm",
                         "stime":"02:40 - 02:55 pm",
                         "mtname":"TPA for severe stroke",
                         "venue":"ITC Grand Chola",
                         "image":"335554075_01-Exterior-Dusk_1_lg (1).jpg",
                         "description1":"            <p>\r\n\tN\/A<\/p>\r\n            ",
                         "description":"           <p>\r\n\tTPA for severe stroke<\/p>\r\n            "
                      },
                      {
                         "id":"24",
                         "date":"2016-03-19",
                         "time":"02:00 - 03:35 pm",
                         "stime":"03:00 - 03:15 pm",
                         "mtname":"Mechanical devices for CPR",
                         "venue":"ITC Grand Chola",
                         "image":"1899166535_01-Exterior-Dusk_1_lg (1).jpg",
                         "description1":"<p>\r\n\tN\/A<\/p>\r\n",
                         "description":"<p>\r\n\tMechanical devices for CPR<\/p>\r\n"
                      },
                      {
                         "id":"25",
                         "date":"2016-03-19",
                         "time":"02:00 - 03:35 pm",
                         "stime":"03:20 - 03:35 pm",
                         "mtname":"Fulcrum in ED",
                         "venue":"ITC Grand Chola",
                         "image":"1516675377_01-Exterior-Dusk_1_lg (1).jpg",
                         "description1":"<p>\r\n\tN\/A<\/p>\r\n",
                         "description":"<p>\r\n\tIV lidocaine for renal colic<\/p>\r\n"
                      }
                   ]
                },
                {
                   "time":[
                      "03:35 - 5:10 pm"
                   ],
                   "schedule_timeslot":[
                      {
                         "id":"26",
                         "date":"2016-03-19",
                         "time":"03:35 - 5:10 pm",
                         "stime":"03:35 - 03:50 pm",
                         "mtname":"Looking beyond clinical care",
                         "venue":"ITC Grand Chola",
                         "image":"1823510243_lobby.jpg",
                         "description1":"<p>\r\n\tN\/A<\/p>\r\n",
                         "description":"<p>\r\n\tMedications that you need to be wary of in the ED<\/p>\r\n"
                      },
                      {
                         "id":"27",
                         "date":"2016-03-19",
                         "time":"03:35 - 5:10 pm",
                         "stime":"03:55 -0.4:10 pm",
                         "mtname":"Looking beyond clinical care",
                         "venue":"ITC Grand Chola",
                         "image":"",
                         "description1":"<p>\r\n\tN\/A<\/p>\r\n",
                         "description":"<p>\r\n\tWays smartphones will change healthcare delivery<\/p>\r\n"
                      },
                      {
                         "id":"28",
                         "date":"2016-03-19",
                         "time":"03:35 - 5:10 pm",
                         "stime":"04:15 - 0:430 pm",
                         "mtname":"Looking beyond clinical care",
                         "venue":"ITC Grand Chola",
                         "image":"748683303_lobby.jpg",
                         "description1":"<p>\r\n\tN\/A<\/p>\r\n",
                         "description":"<p>\r\n\tEmergency dept - Start of shift checklist<\/p>\r\n"
                      },
                      {
                         "id":"29",
                         "date":"2016-03-19",
                         "time":"03:35 - 5:10 pm",
                         "stime":"04:35 - 04:50 pm",
                         "mtname":"Looking beyond clinical care",
                         "venue":"ITC Grand Chola",
                         "image":"1587317187_lobby.jpg",
                         "description1":"<p>\r\n\tN\/A<\/p>\r\n",
                         "description":"<p>\r\n\tPalliative care in the ED - how to do it right<\/p>\r\n"
                      },
                      {
                         "id":"30",
                         "date":"2016-03-19",
                         "time":"03:35 - 5:10 pm",
                         "stime":"04:55 - 05:10 pm",
                         "mtname":"Looking beyond clinical care",
                         "venue":"ITC Grand Chola",
                         "image":"1636028436_lobby.jpg",
                         "description1":"<p>\r\n\tN\/A<\/p>\r\n",
                         "description":"<p>\r\n\tFactors affecting communication in the ED<\/p>\r\n"
                      }
                   ]
                },
                {
                   "time":[
                      "05:10 -05:30 pm"
                   ],
                   "schedule_timeslot":[
                      {
                         "id":"31",
                         "date":"2016-03-19",
                         "time":"05:10 -05:30 pm",
                         "stime":"05:10 - 05:30 pm",
                         "mtname":"Tea Break",
                         "venue":"ITC Grand Chola",
                         "image":"",
                         "description1":"<p>\r\n\tN\/A<\/p>\r\n",
                         "description":"<p>\r\n\tTea Break<\/p>\r\n"
                      }
                   ]
                },
                {
                   "time":[
                      "05:30 - 06:30 pm"
                   ],
                   "schedule_timeslot":[
                      {
                         "id":"32",
                         "date":"2016-03-19",
                         "time":"05:30 - 06:30 pm",
                         "stime":"05:30 - 06:30 pm",
                         "mtname":"Quiz competition",
                         "venue":"ITC Grand Chola",
                         "image":"",
                         "description1":"<p>\r\n\tN\/A<\/p>\r\n",
                         "description":"<p>\r\n\tQuiz competition<\/p>\r\n"
                      }
                   ]
                },
                {
                   "time":[
                      "07:00 - 08:00 pm"
                   ],
                   "schedule_timeslot":[
                      {
                         "id":"33",
                         "date":"2016-03-19",
                         "time":"07:00 - 08:00 pm",
                         "stime":"07:00 -08:00 pm",
                         "mtname":"Banquet & Cultural Evening",
                         "venue":"ITC Grand Chola",
                         "image":"",
                         "description1":"<p>\r\n\tN\/A<\/p>\r\n",
                         "description":"<p>\r\n\tBanquet &amp; Cultural Evening<\/p>\r\n"
                      }
                   ]
                }
             ]
          },
       ]
    }

我想从

中删除Square Brackers
"time":[
        "09:00 \u2013 10:35 am"
       ],

并将其更改为

"time":"09:00 \u2013 10:35 am",

0 个答案:

没有答案