我的数据库中有许多与此类似的条目:
s:4075:"{"submitted_values":{"15":"","13":{"13.2":"","13.3":"Me","13.4":"","13.6":"McGee","13.8":""},"14":{"14.2":"","14.3":"You","14.4":"","14.6":"McGoo","14.8":""},"23":"","178":"CST","191":["","","pm"],"192":["","","pm"],"19":"","18":{"18.1":"","18.2":"","18.3":"","18.4":"","18.5":"","18.6":"United States","18_copy_values_activated":false},"20":{"20.1":"","20.2":"","20.3":"","20.4":"","20.5":"","20.6":"United States","20_copy_values_activated":true},"21":{"21.1":"","21.2":"","21.3":"","21.4":"","21.5":"","21.6":"United States","21_copy_values_activated":true},"22":{"22.1":"","22.2":"","22.3":"","22.4":"","22.5":"","22.6":"United States","22_copy_values_activated":true},"151":[{"Name":"","Position":"","Phone Number":"","Email":""}],"193":[""],"148":{"148.1":"","148.2":"","148.3":"","148.4":"","148.5":"","148.6":"","148.7":""},"149":[{"Name":"","Instrument":""}],"150":"","24":"","25":"","26":"","29":"","30":["","","pm"],"31":["","","pm"],"33":["","","pm"],"159":"","34":"","37":["","","am"],"39":"","40":"","32":"","41":"","42":"","170":["","","pm"],"43":"","180":"","44":"","46":"","62":"","160":"","50":"","47":"","48":"","51":"","52":"","53":"","54":"","55":"","181":"","56":"","57":"","141":"","142":"","58":"","59":"","60":"","61":"","196":"","63":"","64":"","65":"","67":"","66":"","161":{"161.1":"","161.2":"","161.3":""},"190":"","158":"","69":"","27":"","71":"","28":"","72":["","","pm"],"73":["","","pm"],"164":"","76":["","","pm"],"162":"","163":"","77":["","","pm"],"182":"","78":"","152":"","153":"","82":"","146":{"146.1":"","146.2":"","146.3":""},"157":"","79":"","83":"","84":"","85":"","86":["","","pm"],"87":["","","pm"],"88":["","","pm"],"89":"","95":[{"Name":"","Phonetic Spelling":"","Order":""}],"166":"","90":"","165":"","185":"","186":"","183":"","184":"","92":["","","pm"],"187":"","96":["","","pm"],"94":[{"Name":"","Relation":""}],"97":"","188":["","","pm"],"98":[{"Name":"","Phonetic Spelling":""}],"99":"","100":"","154":"","155":"","103":"","102":"","104":"","105":"","106":"","107":["","","pm"],"108":[{"Dancers":"","Relationship":"","Song\/Artist":"","Live\/DJ":""}],"167":"","168":"","109":"","110":"","111":"","112":"","113":"","114":"","115":"","169":"","116":[{"Song Title":"","Artist":"","Live\/DJ":""}],"117":"","118":"","119":"","120":"","156":"","147":"","121":"","122":"","123":"","124":"","189":"","179":"","126":"","127":"","128":["","","pm"],"129":["","","pm"],"130":["","","pm"],"131":"","132":"","133":"","134":[{"Wireless Name":"","Password":""}],"135":"","144":[{"College\/University Song":""}],"137":"","145":"","194":"","195":"","173":"","174":"","175":"","171":"","172":"","139":"","176":"50","197":"admin","198":null},"partial_entry":{"id":null,"post_id":null,"date_created":null,"form_id":4,"ip":"104.235.99.179","source_url":"example.com\/questionnaire\/","user_agent":"Mozilla\/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko\/20100101 Firefox\/40.0","currency":"USD","created_by":1,"13.2":"","13.3":"Me","13.4":"","13.6":"McGee","13.8":"","14.2":"","14.3":"You","14.4":"","14.6":"McGoo","14.8":"","178":"CST","191":"","192":"","18.1":"","18.2":"","18.3":"","18.4":"","18.5":"","18.6":"United States","20.1":"","20.2":"","20.3":"","20.4":"","20.5":"","20.6":"United States","21.1":"","21.2":"","21.3":"","21.4":"","21.5":"","21.6":"United States","22.1":"","22.2":"","22.3":"","22.4":"","22.5":"","22.6":"United States","151":"","193":"","148.1":"","148.2":"","148.3":"","148.4":"","148.5":"","148.6":"","148.7":"","26":"","72":"","73":"","162":"","77":"","182":"","78":"","152":"","146.1":"","146.2":"","146.3":"","157":"","86":"","87":"","88":"","89":"","95":"","166":"","90":"","183":"","92":"","187":"","96":"","94":"","97":"","99":"","100":"","154":"","103":"","107":"","108":"","167":"","109":"","111":"","113":"","115":"","117":"","118":"","119":"","156":"","124":"","179":"","127":"","129":"","130":"","131":"","133":"","135":"","137":"","194":"","173":"","171":"","139":"","176":"50","197":"admin"},"field_values":"","page_number":"1","files":[],"gform_unique_id":"560319d874e94"}";
当它被反序列化时,它看起来像这样:
{"submitted_values":{"15":"","13":{"13.2":"","13.3":"Me","13.4":"","13.6":"McGee","13.8":""},"14":{"14.2":"","14.3":"You","14.4":"","14.6":"McGoo","14.8":""},"23":"","178":"CST","191":["","","pm"],"192":["","","pm"],"19":"","18":{"18.1":"","18.2":"","18.3":"","18.4":"","18.5":"","18.6":"United States","18_copy_values_activated":false},"20":{"20.1":"","20.2":"","20.3":"","20.4":"","20.5":"","20.6":"United States","20_copy_values_activated":true},"21":{"21.1":"","21.2":"","21.3":"","21.4":"","21.5":"","21.6":"United States","21_copy_values_activated":true},"22":{"22.1":"","22.2":"","22.3":"","22.4":"","22.5":"","22.6":"United States","22_copy_values_activated":true},"151":[{"Name":"","Position":"","Phone Number":"","Email":""}],"193":[""],"148":{"148.1":"","148.2":"","148.3":"","148.4":"","148.5":"","148.6":"","148.7":""},"149":[{"Name":"","Instrument":""}],"150":"","24":"","25":"","26":"","29":"","30":["","","pm"],"31":["","","pm"],"33":["","","pm"],"159":"","34":"","37":["","","am"],"39":"","40":"","32":"","41":"","42":"","170":["","","pm"],"43":"","180":"","44":"","46":"","62":"","160":"","50":"","47":"","48":"","51":"","52":"","53":"","54":"","55":"","181":"","56":"","57":"","141":"","142":"","58":"","59":"","60":"","61":"","196":"","63":"","64":"","65":"","67":"","66":"","161":{"161.1":"","161.2":"","161.3":""},"190":"","158":"","69":"","27":"","71":"","28":"","72":["","","pm"],"73":["","","pm"],"164":"","76":["","","pm"],"162":"","163":"","77":["","","pm"],"182":"","78":"","152":"","153":"","82":"","146":{"146.1":"","146.2":"","146.3":""},"157":"","79":"","83":"","84":"","85":"","86":["","","pm"],"87":["","","pm"],"88":["","","pm"],"89":"","95":[{"Name":"","Phonetic Spelling":"","Order":""}],"166":"","90":"","165":"","185":"","186":"","183":"","184":"","92":["","","pm"],"187":"","96":["","","pm"],"94":[{"Name":"","Relation":""}],"97":"","188":["","","pm"],"98":[{"Name":"","Phonetic Spelling":""}],"99":"","100":"","154":"","155":"","103":"","102":"","104":"","105":"","106":"","107":["","","pm"],"108":[{"Dancers":"","Relationship":"","Song\/Artist":"","Live\/DJ":""}],"167":"","168":"","109":"","110":"","111":"","112":"","113":"","114":"","115":"","169":"","116":[{"Song Title":"","Artist":"","Live\/DJ":""}],"117":"","118":"","119":"","120":"","156":"","147":"","121":"","122":"","123":"","124":"","189":"","179":"","126":"","127":"","128":["","","pm"],"129":["","","pm"],"130":["","","pm"],"131":"","132":"","133":"","134":[{"Wireless Name":"","Password":""}],"135":"","144":[{"College\/University Song":""}],"137":"","145":"","194":"","195":"","173":"","174":"","175":"","171":"","172":"","139":"","176":"50","197":"admin","198":null},"partial_entry":{"id":null,"post_id":null,"date_created":null,"form_id":4,"ip":"104.235.99.179","source_url":"example.com\/questionnaire\/","user_agent":"Mozilla\/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko\/20100101 Firefox\/40.0","currency":"USD","created_by":1,"13.2":"","13.3":"Me","13.4":"","13.6":"McGee","13.8":"","14.2":"","14.3":"You","14.4":"","14.6":"McGoo","14.8":"","178":"CST","191":"","192":"","18.1":"","18.2":"","18.3":"","18.4":"","18.5":"","18.6":"United States","20.1":"","20.2":"","20.3":"","20.4":"","20.5":"","20.6":"United States","21.1":"","21.2":"","21.3":"","21.4":"","21.5":"","21.6":"United States","22.1":"","22.2":"","22.3":"","22.4":"","22.5":"","22.6":"United States","151":"","193":"","148.1":"","148.2":"","148.3":"","148.4":"","148.5":"","148.6":"","148.7":"","26":"","72":"","73":"","162":"","77":"","182":"","78":"","152":"","146.1":"","146.2":"","146.3":"","157":"","86":"","87":"","88":"","89":"","95":"","166":"","90":"","183":"","92":"","187":"","96":"","94":"","97":"","99":"","100":"","154":"","103":"","107":"","108":"","167":"","109":"","111":"","113":"","115":"","117":"","118":"","119":"","156":"","124":"","179":"","127":"","129":"","130":"","131":"","133":"","135":"","137":"","194":"","173":"","171":"","139":"","176":"50","197":"admin"},"field_values":"","page_number":"1","files":[],"gform_unique_id":"560319d874e94"}
使用json_decode,我得到:
object(stdClass)#615 (6) { ["submitted_values"]=> object(stdClass)#763 (164) { ["15"]=> string(0) "" ["13"]=> object(stdClass)#728 (5) { ["13.2"]=> string(0) "" ["13.3"]=> string(2) "Me" ["13.4"]=> string(0) "" ["13.6"]=> string(5) "McGee" ["13.8"]=> string(0) "" } ["14"]=> object(stdClass)#762 (5) { ["14.2"]=> string(0) "" ["14.3"]=> string(3) "You" ["14.4"]=> string(0) "" ["14.6"]=> string(5) "McGoo" ["14.8"]=> string(0) "" } ["23"]=> string(0) "" ["178"]=> string(3) "CST" ["191"]=> array(3) { [0]=> string(0) "" [1]=> string(0) "" [2]=> string(2) "pm" } ["192"]=> array(3) { [0]=> string(0) "" [1]=> string(0) "" [2]=> string(2) "pm" } ["19"]=> string(0) "" ["18"]=> object(stdClass)#761 (7) { ["18.1"]=> string(0) "" ["18.2"]=> string(0) "" ["18.3"]=> string(0) "" ["18.4"]=> string(0) "" ["18.5"]=> string(0) "" ["18.6"]=> string(13) "United States" ["18_copy_values_activated"]=> bool(false) } ["20"]=> object(stdClass)#760 (7) { ["20.1"]=> string(0) "" ["20.2"]=> string(0) "" ["20.3"]=> string(0) "" ["20.4"]=> string(0) "" ["20.5"]=> string(0) "" ["20.6"]=> string(13) "United States" ["20_copy_values_activated"]=> bool(true) } ["21"]=> object(stdClass)#759 (7) { ["21.1"]=> string(0) "" ["21.2"]=> string(0) "" ["21.3"]=> string(0) "" ["21.4"]=> string(0) "" ["21.5"]=> string(0) "" ["21.6"]=> string(13) "United States" ["21_copy_values_activated"]=> bool(true) } ["22"]=> object(stdClass)#758 (7) { ["22.1"]=> string(0) "" ["22.2"]=> string(0) "" ["22.3"]=> string(0) "" ["22.4"]=> string(0) "" ["22.5"]=> string(0) "" ["22.6"]=> string(13) "United States" ["22_copy_values_activated"]=> bool(true) } ["151"]=> array(1) { [0]=> object(stdClass)#757 (4) { ["Name"]=> string(0) "" ["Position"]=> string(0) "" ["Phone Number"]=> string(0) "" ["Email"]=> string(0) "" } } ["193"]=> array(1) { [0]=> string(0) "" } ["148"]=> object(stdClass)#756 (7) { ["148.1"]=> string(0) "" ["148.2"]=> string(0) "" ["148.3"]=> string(0) "" ["148.4"]=> string(0) "" ["148.5"]=> string(0) "" ["148.6"]=> string(0) "" ["148.7"]=> string(0) "" } ["149"]=> array(1) { [0]=> object(stdClass)#755 (2) { ["Name"]=> string(0) "" ["Instrument"]=> string(0) "" } } ["150"]=> string(0) "" ["24"]=> string(0) "" ["25"]=> string(0) "" ["26"]=> string(0) "" ["29"]=> string(0) "" ["30"]=> array(3) { [0]=> string(0) "" [1]=> string(0) "" [2]=> string(2) "pm" } ["31"]=> array(3) { [0]=> string(0) "" [1]=> string(0) "" [2]=> string(2) "pm" } ["33"]=> array(3) { [0]=> string(0) "" [1]=> string(0) "" [2]=> string(2) "pm" } ["159"]=> string(0) "" ["34"]=> string(0) "" ["37"]=> array(3) { [0]=> string(0) "" [1]=> string(0) "" [2]=> string(2) "am" } ["39"]=> string(0) "" ["40"]=> string(0) "" ["32"]=> string(0) "" ["41"]=> string(0) "" ["42"]=> string(0) "" ["170"]=> array(3) { [0]=> string(0) "" [1]=> string(0) "" [2]=> string(2) "pm" } ["43"]=> string(0) "" ["180"]=> string(0) "" ["44"]=> string(0) "" ["46"]=> string(0) "" ["62"]=> string(0) "" ["160"]=> string(0) "" ["50"]=> string(0) "" ["47"]=> string(0) "" ["48"]=> string(0) "" ["51"]=> string(0) "" ["52"]=> string(0) "" ["53"]=> string(0) "" ["54"]=> string(0) "" ["55"]=> string(0) "" ["181"]=> string(0) "" ["56"]=> string(0) "" ["57"]=> string(0) "" ["141"]=> string(0) "" ["142"]=> string(0) "" ["58"]=> string(0) "" ["59"]=> string(0) "" ["60"]=> string(0) "" ["61"]=> string(0) "" ["196"]=> string(0) "" ["63"]=> string(0) "" ["64"]=> string(0) "" ["65"]=> string(0) "" ["67"]=> string(0) "" ["66"]=> string(0) "" ["161"]=> object(stdClass)#754 (3) { ["161.1"]=> string(0) "" ["161.2"]=> string(0) "" ["161.3"]=> string(0) "" } ["190"]=> string(0) "" ["158"]=> string(0) "" ["69"]=> string(0) "" ["27"]=> string(0) "" ["71"]=> string(0) "" ["28"]=> string(0) "" ["72"]=> array(3) { [0]=> string(0) "" [1]=> string(0) "" [2]=> string(2) "pm" } ["73"]=> array(3) { [0]=> string(0) "" [1]=> string(0) "" [2]=> string(2) "pm" } ["164"]=> string(0) "" ["76"]=> array(3) { [0]=> string(0) "" [1]=> string(0) "" [2]=> string(2) "pm" } ["162"]=> string(0) "" ["163"]=> string(0) "" ["77"]=> array(3) { [0]=> string(0) "" [1]=> string(0) "" [2]=> string(2) "pm" } ["182"]=> string(0) "" ["78"]=> string(0) "" ["152"]=> string(0) "" ["153"]=> string(0) "" ["82"]=> string(0) "" ["146"]=> object(stdClass)#753 (3) { ["146.1"]=> string(0) "" ["146.2"]=> string(0) "" ["146.3"]=> string(0) "" } ["157"]=> string(0) "" ["79"]=> string(0) "" ["83"]=> string(0) "" ["84"]=> string(0) "" ["85"]=> string(0) "" ["86"]=> array(3) { [0]=> string(0) "" [1]=> string(0) "" [2]=> string(2) "pm" } ["87"]=> array(3) { [0]=> string(0) "" [1]=> string(0) "" [2]=> string(2) "pm" } ["88"]=> array(3) { [0]=> string(0) "" [1]=> string(0) "" [2]=> string(2) "pm" } ["89"]=> string(0) "" ["95"]=> array(1) { [0]=> object(stdClass)#694 (3) { ["Name"]=> string(0) "" ["Phonetic Spelling"]=> string(0) "" ["Order"]=> string(0) "" } } ["166"]=> string(0) "" ["90"]=> string(0) "" ["165"]=> string(0) "" ["185"]=> string(0) "" ["186"]=> string(0) "" ["183"]=> string(0) "" ["184"]=> string(0) "" ["92"]=> array(3) { [0]=> string(0) "" [1]=> string(0) "" [2]=> string(2) "pm" } ["187"]=> string(0) "" ["96"]=> array(3) { [0]=> string(0) "" [1]=> string(0) "" [2]=> string(2) "pm" } ["94"]=> array(1) { [0]=> object(stdClass)#697 (2) { ["Name"]=> string(0) "" ["Relation"]=> string(0) "" } } ["97"]=> string(0) "" ["188"]=> array(3) { [0]=> string(0) "" [1]=> string(0) "" [2]=> string(2) "pm" } ["98"]=> array(1) { [0]=> object(stdClass)#698 (2) { ["Name"]=> string(0) "" ["Phonetic Spelling"]=> string(0) "" } } ["99"]=> string(0) "" ["100"]=> string(0) "" ["154"]=> string(0) "" ["155"]=> string(0) "" ["103"]=> string(0) "" ["102"]=> string(0) "" ["104"]=> string(0) "" ["105"]=> string(0) "" ["106"]=> string(0) "" ["107"]=> array(3) { [0]=> string(0) "" [1]=> string(0) "" [2]=> string(2) "pm" } ["108"]=> array(1) { [0]=> object(stdClass)#699 (4) { ["Dancers"]=> string(0) "" ["Relationship"]=> string(0) "" ["Song/Artist"]=> string(0) "" ["Live/DJ"]=> string(0) "" } } ["167"]=> string(0) "" ["168"]=> string(0) "" ["109"]=> string(0) "" ["110"]=> string(0) "" ["111"]=> string(0) "" ["112"]=> string(0) "" ["113"]=> string(0) "" ["114"]=> string(0) "" ["115"]=> string(0) "" ["169"]=> string(0) "" ["116"]=> array(1) { [0]=> object(stdClass)#700 (3) { ["Song Title"]=> string(0) "" ["Artist"]=> string(0) "" ["Live/DJ"]=> string(0) "" } } ["117"]=> string(0) "" ["118"]=> string(0) "" ["119"]=> string(0) "" ["120"]=> string(0) "" ["156"]=> string(0) "" ["147"]=> string(0) "" ["121"]=> string(0) "" ["122"]=> string(0) "" ["123"]=> string(0) "" ["124"]=> string(0) "" ["189"]=> string(0) "" ["179"]=> string(0) "" ["126"]=> string(0) "" ["127"]=> string(0) "" ["128"]=> array(3) { [0]=> string(0) "" [1]=> string(0) "" [2]=> string(2) "pm" } ["129"]=> array(3) { [0]=> string(0) "" [1]=> string(0) "" [2]=> string(2) "pm" } ["130"]=> array(3) { [0]=> string(0) "" [1]=> string(0) "" [2]=> string(2) "pm" } ["131"]=> string(0) "" ["132"]=> string(0) "" ["133"]=> string(0) "" ["134"]=> array(1) { [0]=> object(stdClass)#701 (2) { ["Wireless Name"]=> string(0) "" ["Password"]=> string(0) "" } } ["135"]=> string(0) "" ["144"]=> array(1) { [0]=> object(stdClass)#702 (1) { ["College/University Song"]=> string(0) "" } } ["137"]=> string(0) "" ["145"]=> string(0) "" ["194"]=> string(0) "" ["195"]=> string(0) "" ["173"]=> string(0) "" ["174"]=> string(0) "" ["175"]=> string(0) "" ["171"]=> string(0) "" ["172"]=> string(0) "" ["139"]=> string(0) "" ["176"]=> string(2) "50" ["197"]=> string(5) "admin" ["198"]=> NULL } ["partial_entry"]=> object(stdClass)#703 (110) { ["id"]=> NULL ["post_id"]=> NULL ["date_created"]=> NULL ["form_id"]=> int(4) ["ip"]=> string(14) "104.235.99.179" ["source_url"]=> string(53) "example.com/questionnaire/" ["user_agent"]=> string(72) "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0" ["currency"]=> string(3) "USD" ["created_by"]=> int(1) ["13.2"]=> string(0) "" ["13.3"]=> string(2) "Me" ["13.4"]=> string(0) "" ["13.6"]=> string(5) "McGee" ["13.8"]=> string(0) "" ["14.2"]=> string(0) "" ["14.3"]=> string(3) "You" ["14.4"]=> string(0) "" ["14.6"]=> string(5) "McGoo" ["14.8"]=> string(0) "" ["178"]=> string(3) "CST" ["191"]=> string(0) "" ["192"]=> string(0) "" ["18.1"]=> string(0) "" ["18.2"]=> string(0) "" ["18.3"]=> string(0) "" ["18.4"]=> string(0) "" ["18.5"]=> string(0) "" ["18.6"]=> string(13) "United States" ["20.1"]=> string(0) "" ["20.2"]=> string(0) "" ["20.3"]=> string(0) "" ["20.4"]=> string(0) "" ["20.5"]=> string(0) "" ["20.6"]=> string(13) "United States" ["21.1"]=> string(0) "" ["21.2"]=> string(0) "" ["21.3"]=> string(0) "" ["21.4"]=> string(0) "" ["21.5"]=> string(0) "" ["21.6"]=> string(13) "United States" ["22.1"]=> string(0) "" ["22.2"]=> string(0) "" ["22.3"]=> string(0) "" ["22.4"]=> string(0) "" ["22.5"]=> string(0) "" ["22.6"]=> string(13) "United States" ["151"]=> string(0) "" ["193"]=> string(0) "" ["148.1"]=> string(0) "" ["148.2"]=> string(0) "" ["148.3"]=> string(0) "" ["148.4"]=> string(0) "" ["148.5"]=> string(0) "" ["148.6"]=> string(0) "" ["148.7"]=> string(0) "" ["26"]=> string(0) "" ["72"]=> string(0) "" ["73"]=> string(0) "" ["162"]=> string(0) "" ["77"]=> string(0) "" ["182"]=> string(0) "" ["78"]=> string(0) "" ["152"]=> string(0) "" ["146.1"]=> string(0) "" ["146.2"]=> string(0) "" ["146.3"]=> string(0) "" ["157"]=> string(0) "" ["86"]=> string(0) "" ["87"]=> string(0) "" ["88"]=> string(0) "" ["89"]=> string(0) "" ["95"]=> string(0) "" ["166"]=> string(0) "" ["90"]=> string(0) "" ["183"]=> string(0) "" ["92"]=> string(0) "" ["187"]=> string(0) "" ["96"]=> string(0) "" ["94"]=> string(0) "" ["97"]=> string(0) "" ["99"]=> string(0) "" ["100"]=> string(0) "" ["154"]=> string(0) "" ["103"]=> string(0) "" ["107"]=> string(0) "" ["108"]=> string(0) "" ["167"]=> string(0) "" ["109"]=> string(0) "" ["111"]=> string(0) "" ["113"]=> string(0) "" ["115"]=> string(0) "" ["117"]=> string(0) "" ["118"]=> string(0) "" ["119"]=> string(0) "" ["156"]=> string(0) "" ["124"]=> string(0) "" ["179"]=> string(0) "" ["127"]=> string(0) "" ["129"]=> string(0) "" ["130"]=> string(0) "" ["131"]=> string(0) "" ["133"]=> string(0) "" ["135"]=> string(0) "" ["137"]=> string(0) "" ["194"]=> string(0) "" ["173"]=> string(0) "" ["171"]=> string(0) "" ["139"]=> string(0) "" ["176"]=> string(2) "50" ["197"]=> string(5) "admin" } ["field_values"]=> string(0) "" ["page_number"]=> string(1) "1" ["files"]=> array(0) { } ["gform_unique_id"]=> string(13) "560319d874e94" } bool(true)
我希望能够获得13.3,13.6和14.3,14.6的值。这些都是名字和姓氏。
我需要在php中做些什么才能抓住那些特定的值?
我尝试打印$ content-> {' 14.6'};
$ content是我用于输出的字符串的名称。
答案 0 :(得分:2)
你可以试试这个:
$str = '{"submitted_values":{"15":"","13":{"13.2":"","13.3":"Me","13.4":"","13.6":"McGee","13.8":""},"14":{"14.2":"","14.3":"You","14.4":"","14.6":"McGoo","14.8":""},"23":"","178":"CST","191":["","","pm"],"192":["","","pm"],"19":"","18":{"18.1":"","18.2":"","18.3":"","18.4":"","18.5":"","18.6":"United States","18_copy_values_activated":false},"20":{"20.1":"","20.2":"","20.3":"","20.4":"","20.5":"","20.6":"United States","20_copy_values_activated":true},"21":{"21.1":"","21.2":"","21.3":"","21.4":"","21.5":"","21.6":"United States","21_copy_values_activated":true},"22":{"22.1":"","22.2":"","22.3":"","22.4":"","22.5":"","22.6":"United States","22_copy_values_activated":true},"151":[{"Name":"","Position":"","Phone Number":"","Email":""}],"193":[""],"148":{"148.1":"","148.2":"","148.3":"","148.4":"","148.5":"","148.6":"","148.7":""},"149":[{"Name":"","Instrument":""}],"150":"","24":"","25":"","26":"","29":"","30":["","","pm"],"31":["","","pm"],"33":["","","pm"],"159":"","34":"","37":["","","am"],"39":"","40":"","32":"","41":"","42":"","170":["","","pm"],"43":"","180":"","44":"","46":"","62":"","160":"","50":"","47":"","48":"","51":"","52":"","53":"","54":"","55":"","181":"","56":"","57":"","141":"","142":"","58":"","59":"","60":"","61":"","196":"","63":"","64":"","65":"","67":"","66":"","161":{"161.1":"","161.2":"","161.3":""},"190":"","158":"","69":"","27":"","71":"","28":"","72":["","","pm"],"73":["","","pm"],"164":"","76":["","","pm"],"162":"","163":"","77":["","","pm"],"182":"","78":"","152":"","153":"","82":"","146":{"146.1":"","146.2":"","146.3":""},"157":"","79":"","83":"","84":"","85":"","86":["","","pm"],"87":["","","pm"],"88":["","","pm"],"89":"","95":[{"Name":"","Phonetic Spelling":"","Order":""}],"166":"","90":"","165":"","185":"","186":"","183":"","184":"","92":["","","pm"],"187":"","96":["","","pm"],"94":[{"Name":"","Relation":""}],"97":"","188":["","","pm"],"98":[{"Name":"","Phonetic Spelling":""}],"99":"","100":"","154":"","155":"","103":"","102":"","104":"","105":"","106":"","107":["","","pm"],"108":[{"Dancers":"","Relationship":"","Song\/Artist":"","Live\/DJ":""}],"167":"","168":"","109":"","110":"","111":"","112":"","113":"","114":"","115":"","169":"","116":[{"Song Title":"","Artist":"","Live\/DJ":""}],"117":"","118":"","119":"","120":"","156":"","147":"","121":"","122":"","123":"","124":"","189":"","179":"","126":"","127":"","128":["","","pm"],"129":["","","pm"],"130":["","","pm"],"131":"","132":"","133":"","134":[{"Wireless Name":"","Password":""}],"135":"","144":[{"College\/University Song":""}],"137":"","145":"","194":"","195":"","173":"","174":"","175":"","171":"","172":"","139":"","176":"50","197":"admin","198":null},"partial_entry":{"id":null,"post_id":null,"date_created":null,"form_id":4,"ip":"104.235.99.179","source_url":"http:\/\/www.mysite.com\/questionnaire\/","user_agent":"Mozilla\/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko\/20100101 Firefox\/40.0","currency":"USD","created_by":1,"13.2":"","13.3":"Me","13.4":"","13.6":"McGee","13.8":"","14.2":"","14.3":"You","14.4":"","14.6":"McGoo","14.8":"","178":"CST","191":"","192":"","18.1":"","18.2":"","18.3":"","18.4":"","18.5":"","18.6":"United States","20.1":"","20.2":"","20.3":"","20.4":"","20.5":"","20.6":"United States","21.1":"","21.2":"","21.3":"","21.4":"","21.5":"","21.6":"United States","22.1":"","22.2":"","22.3":"","22.4":"","22.5":"","22.6":"United States","151":"","193":"","148.1":"","148.2":"","148.3":"","148.4":"","148.5":"","148.6":"","148.7":"","26":"","72":"","73":"","162":"","77":"","182":"","78":"","152":"","146.1":"","146.2":"","146.3":"","157":"","86":"","87":"","88":"","89":"","95":"","166":"","90":"","183":"","92":"","187":"","96":"","94":"","97":"","99":"","100":"","154":"","103":"","107":"","108":"","167":"","109":"","111":"","113":"","115":"","117":"","118":"","119":"","156":"","124":"","179":"","127":"","129":"","130":"","131":"","133":"","135":"","137":"","194":"","173":"","171":"","139":"","176":"50","197":"admin"},"field_values":"","page_number":"1","files":[],"gform_unique_id":"560319d874e94"}';
$obj = json_decode($str);
echo $fullname1 = $obj->submitted_values->{'13'}->{'13.3'} . ' ' . $obj->submitted_values->{'13'}->{'13.6'};
echo $fullname2 = $obj->submitted_values->{'14'}->{'14.3'} . ' ' . $obj->submitted_values->{'14'}->{'14.6'};