Please use json_decode to parse into an array jsonp107 ({"SM_368_dsr-1097280647": {v: 0, nv: 100, m_UFB: 0, m: 4.89661, m_g: 20.15, s_UFB: 0, s: 4.8744, s_g: 31.49, c_UFB: 0, c: 4.87867, c_g: 39.55, gp: 100.00, ss: 290167, hdr: true}, "iccp_rj522177046867": 4915 });
To obtain the value 4915, use json_decode to parse it into an array.
Find these lines of code
Reply to discussion (solution)
Http://bbs.csdn.net/topics/391853070? Page = 1 # post-400534281
I gave you a question. it's silly, but it's just what you want.
Or wait for the answer
$s =<<< TXTjsonp107({"SM_368_dsr-1097280647":{v:0,nv:100,m_UFB:0,m:4.89661,m_g:20.15,s_UFB:0,s:4.8744,s_g:31.49,c_UFB:0,c:4.87867,c_g:39.55,gp:100.00,ss:290167,hdr:true},"ICCP_1_522177046867":4915});TXT;$s = preg_replace_callback('/[-".\w]+/', function($m) { return '"' . trim($m[0],'"') . '"'; }, preg_replace('/^.+\((.+)\).+$/', '$1', $s));print_r(json_decode($s, 1));
Array( [SM_368_dsr-1097280647] => Array ( [v] => 0 [nv] => 100 [m_UFB] => 0 [m] => 4.89661 [m_g] => 20.15 [s_UFB] => 0 [s] => 4.8744 [s_g] => 31.49 [c_UFB] => 0 [c] => 4.87867 [c_g] => 39.55 [gp] => 100.00 [ss] => 290167 [hdr] => true ) [ICCP_1_522177046867] => 4915)
B. do not learn PHP. Fucking shame