Answers for "common array and string functions in php"

PHP
17

common array methods php

$colors = array("blue","green","red");

//delete element in array by value "green"
if (($key = array_search("green", $colors)) !== false) {
    unset($colors[$key]);
}
Posted by: Guest on October-30-2019
1

common array methods php

if (count($arr) > 1) {
     ....
}
Posted by: Guest on June-12-2020

Code answers related to "common array and string functions in php"

Browse Popular Code Answers by Language