Search
 
SCRIPT & CODE EXAMPLE
 

PHP

invalid argument supplied for foreach()

<?php
if (is_array($array) || is_object($array))
{
    foreach ($array as $row)
    {
        ...
    }
}
?>
Comment

Invalid argument supplied for foreach() in C

$array = ['dog', 'cat', 'lion'];

if (!empty($array) && isset($array) && is_array($array) {
    //loop
    foreach ($array as $values) {
        echo $values; 
    }
}
Comment

PREVIOUS NEXT
Code Example
Php :: implode with br in php 
Php :: how to get the current year in php 
Php :: php base64img to file 
Php :: wordpress remove user roles 
Php :: laravel validate max file size 
Php :: include a file in laravel controller 
Php :: how to run php file in xampp 
Php :: how to load data from .env file in php 
Php :: get current route in blade laravel 
Php :: if exist php 
Php :: php connect to data base 
Php :: num_rows in php 
Php :: php check version ubuntu 
Php :: get name custom post type wordpress 
Php :: php insert character into string 
Php :: php password validation regex 
Php :: wp get category by id 
Php :: php 8 attributes 
Php :: update sql php 
Php :: php pi() function 
Php :: php delete element from array 
Php :: php isset ternary operator 
Php :: javascript php loop 
Php :: laravel json search 
Php :: laravel with where has 
Php :: how to get woocommerce category image 
Php :: json stringify php decode 
Php :: create view from route laravel 
Php :: php setinterval 
Php :: laravel composer update 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =