Advertisement
Virajsinh

Mixed Array Remove String Value in PhP

Jun 6th, 2023
923
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.14 KB | Source Code | 0 0
  1. $array = array('1','34',45,"pro","23","max");
  2.  
  3. $array = array_filter($array, function($e) {
  4.     return is_numeric($e);
  5. });
  6.  
  7. print_r($array);
Tags: php
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement