PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php $data[] = array("id" => "1", "content" => "Hello"); $data[] = array("id" => "2", "content" => "World"); // filter the data $data1 = array_filter($data, fn ($value) => $value['content'] === 'World'); // map the data $datas = array_map(fn ($value) => ['content' => $value['content']], $data); // reset indexes $data = array_values($data); print_r($data3);
Show:  
Copy Clear