gaurang171
gaurang171

Reputation: 9090

How to convert Array string to an Array in php?

This is my string format

[["1258765200","12350"],["1259370000","13000"],["1259974800","11840"]]

and i want array like

array(
[0] => array([0] => 1258765200, [1] => 12350)
.... 
and so on....
)

I don't have any idea how i can achieve this, Please help me, thanks in advance.

Upvotes: 0

Views: 109

Answers (2)

sics
sics

Reputation: 1318

Use this: json_decode($string, true)

Upvotes: 3

alex
alex

Reputation: 490637

Convert your string into a PHP multi dimensional array using json_decode($str, TRUE).

Upvotes: 4

Related Questions