0

string is : {"4":"50","3":"80"}

i want output like below:

Array ( [4] => 50 [3] => 80 )

please help me.

HK_Khunt
  • 248
  • 1
  • 8

1 Answers1

1

You can use json_ddecode

 myArray = json_decode($myJsonString); 


 myArray = json_decode('{"4":"50","3":"80"}'); 
ScaisEdge
  • 131,976
  • 10
  • 91
  • 107