I need to encode three php arrays that all have the same amount of values. From there it has to be json_encoded.
Array ( [0] => Title1
[1] => 320 KB/s 5.0 MB 1:24
[2] => http://www.example.com/Title1.mp3 )
Array ( [0] => Title2
[1] => 120 KB/s 2.8 MB 3:29
[2] => http://www.example.com/Title2.mp3 )
Array ( [0] => Title3
[1] => 250 KB/s 8.5 MB 4:59
[2] => http://www.example.com/Title3.mp3 )
The json needs to be a json array like the example below.
{
"result": [
{
"link": "http://www.example.com/Title1.mp3",
"metadata": "320 KB/s 5.0 MB 1:24",
"title": "Title1"
},
{
"link": "http://www.example.com/Title2.mp3",
"metadata": "120 KB/s 2.8 MB 3:29",
"title": "Title2"
},
{
"link": "http://www.example.com/Title3.mp3",
"metadata": "250 KB/s 8.5 MB 4:59",
"title": "Title3"
}
]
}