jeudi 20 janvier 2022

($callback) must be a valid callback or null, function "myfunction" not found or invalid function name

I would like to do the array_map but it always show error not found the function,I checked the function name is same. How can I solve this?

 function myfunction($item){
            unset($item['key']);
            return $item;

         }
         print_r(array_map("myfunction",$request->data));


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire