I am getting data into two arrays and i want to push that data into single array one by one. Let say i want to get first element from first array and first element from second array and then push that data into single array.
first array
$url = $a->attr['href'];
$lnk[] = ['url'=>$url];
second array
$img = $img->attr['src'];
$img[] = ['img'=>$img];
I want this
$data[] = ['url'=>$url, 'img'=>$img];