Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

How To Unset Or Delete An Element From Array By Value In PHP?

if (($key = array_search($value, $sampleArray)) !== false) {
    unset($sampleArray[$key]);
}
Source by www.tutsplanet.com #
 
PREVIOUS NEXT
Tagged: #How #To #Unset #Or #Delete #An #Element #From #Array #By #Value #In
ADD COMMENT
Topic
Name
2+7 =