sorry my english is bad. I use google translation. i have 2 veriable. I did not get the output I wanted. the output format I want is as follows
$texts= "{1,3} Test asd
{2} Test qwe
{2,3} Test 123
{3} Test zxc
{3,4} Test vbn";
$urls= "{1} http://example.com/asd
{2} http://example/qwe
{3} http://example/123
{4} http://example/zxc"
Want Output
{
"1":[{"url":"http://example.com/asd"},
{"text":["Test asd"]}
],
"2":[{"url":"http://example.com/qwe"},
{"text":["Test qwe","Test 123"]}
],
"3":[{"url":"http://example.com/123"},
{"text":["Test 123","Test zxc","Test vbn"]}
],
"4":[{"url":"http://example.com/zxc"},
{"text":["Test vbn"]}
]
}