Checking if a value exists in a PHP array

It is possible to use PHP’s in_array method to determine if a value is in array or not. If a value is in array, then this method will return true, it will return false if it is not there.

It is also possible to use array_search method to check if the value exists in an associative array.

Comments

Popular posts from this blog

Absolute and relative path in HTML pages

Errors

goto PHP operator