How to use a function to cross merge two arrays?

how do I use a function to cross merge two arrays?

Mar.04,2021

wrote a method that I don't know if it is what the landlord wants, as follows:

function jiaochaArray($arr1, $arr2)
{
    $arr1 = array_values($arr1);
    $arr2 = array_values($arr2);
    $count = max(count($arr1), count($arr2));
    $arr = array();
    for ($i = 0; $i < $count; $iPP) {
        if ($i < count($arr1)) $arr[] = $arr1[$i];
        if ($i < count($arr2)) $arr[] = $arr2[$i];
    }
    return $arr;
}

function mergeArr(arr1, arr2) {
  let arr = arr1.slice(0)
  arr2.forEach((item, index) => {
    arr.splice(2 * (index + 1) - 1, 0, item)
  })
  return arr
}

array_intersect ()

If the

system is ready-made, don't write it yourself

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37cab-e610.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37cab-e610.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?