Sat, June 10, 2023
https://devcodepro.comdevcodepro
Home · Latest · Trends
1

count(): Argument #1 ($var) must be of type Countable fix

<?php

if (is_iterable($children)) {
 foreach ($children as $child) {
 }
}

//if ((count($children)) > 0) {
 //foreach ($children as $child) {
 //}
//}

?>
AD ยท www.interserver.net/r/240055 

Interserver | Standard & VPS Cloud Hosting | $2.50 /Month

Flexible VPS hosting platform to deploy your online projects. Economical and balanced between processor cores, memory and storage
rated 1 times (1) (0)
comments: 1 / hits: 1665  / 2 years ago, tue, feb 23, 21, 01:51:57
More From » PHP
 

Comments

1
Code:
<?php
if (function_exists('is_iterable')) {
if (is_iterable($children)) {
foreach ($children as $child)
render($child);
}
} else {
if ((count($children)) > 0) {
foreach ($children as $child)
render($child);
}
}
?>
[#57] Thursday, May 13, 2021, 8:54:57
 
Ronald
commented 2 years ago
Only authorized users can post. Please sign in first, or register a free account
Login with Google
 
Share
Posted
Jake
Member since Jan 6, 2021
Total Code Snippets: 4
Total Comments: 0
Location: Hartford, CT
Jake snippets
2 years ago, wed, jan 6, 21, 2:42:50
SELECT *, COUNT(IF(date >= curdate(), 1, NULL)) 'todaycount', COUNT(IF(yearweek(date) = yearweek(curdate()), 1, NULL)) 'weekcount', COUNT(IF(month(date) = month(curdate()), 1, NULL)) 'monthcount', COUNT(IF(date <= curdate(), 1, NULL)) 'allcount' FROM mytable
comments: 1 / hits: 1134
SQL
2 years ago, sun, jan 24, 21, 5:39:27
.navbar-brand { background-image: url(images/logoimage.png); background-repeat: no-repeat; display: block; background-position: left; width: 100%; min-height: 48px; } /* <a class="navbar-brand" href="index.html"></a> */
comments: 0 / hits: 514
CSS
2 years ago, mon, jan 25, 21, 10:13:23
if (!$_POST) { echo 'POST Not Exist'; } else { echo 'POST Exist'; } if (!$_GET) { echo 'GET Not Exist'; } else { echo 'GET Exist'; }
comments: 0 / hits: 459
PHP