PHP is_iterable() Function
The is_iterable() function in PHP verifies that the contents of the specified variable is an iterable value.
Syntax
is_iterable ( mixed $var )
var(required)- This parameter represents the value to check.
Return
This function returns a Boolean value TRUE if the parameter var is iterable, else it returns FALSE.
Example 1
Output
The var is iterable
Example 2
Output
bool(true) bool(true) bool(true)
Example 3
Output
bool(false) bool(false)