The PHP array is split into two arrays based on key values

Warriors, there is an array of case information. Now I want to separate the cases with the character "[pre]" in anjian_title to form a new array. How to write this for loop?

Aug.23,2021

$newArr = [];
foreach($arr as $key => $val)
{
    if(strpos($val['anjian_title'], '[]') !== false){
        $newArr[] = $arr[$key];
    }
}

$arr1 = array_map(function($item) {
    return strpos($item['anjian_title'], '[]') !== false;
}, $arr);
$arr2 = array_map(function($item) {
    return strpos($item['anjian_title'], '[]') === false;
}, $arr);
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-1eb76dc-48436.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-1eb76dc-48436.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?