PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php $datas = array("id" => [], "content" => 2); $data = array("id" => 3, "content" => 4); // filter the data //$data = array_filter($data, fn ($value) => $value['content'] === 'World'); // map the data //$data = array_map(fn ($value) => ['content' => $value['content']], $data); // reset indexes //$data = array_values($data); $datal = array_sum($data); $datala = array_filter($datas, fn($e) => count($e)); print_r($datala);
Show:  
Copy Clear