PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php $arr1 = [ ["url" => "/1/1/1", "cnt" => "1"], ["url" => "/2/2/2", "cnt" => "1"], ["url" => "/3/3/3", "cnt" => "1"] ]; $arr2 = [ ["url" => "/2/2/2", "cnt" => "1"], ["url" => "/4/4/4", "cnt" => "1"] ]; $url2arr = array_column($arr2, 'url', 'url'); $res = array_filter($arr1, fn($el)=>!isset($url2arr[$el['url']])); print_r($res);
Show:  
Copy Clear