php - How do i remove a value in array ? -


$abc = array( 1 ,2, 3, 4, 5  934, ......); 

now want remove particular value array without loop since array can contain n number of values.

note : value not repeated. 

you can use

<?php   $key = array_search(5, $abc);   if($key!==false) unset($abc[$key]); ?> 

Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -