kushal33

php code to remove array value

Dec 30th, 2015
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.10 KB | None | 0 0
  1. $a=array(1,2,3);
  2. $key=array_search(3,$a);
  3. if(isset($key))
  4. {
  5.   unset($a[$key]);
  6. print_r($a);
  7. }
Add Comment
Please, Sign In to add comment