Search
 
SCRIPT & CODE EXAMPLE
 

PHP

bool value of blank string inp php


<?php
/**
* @author :  Nanhe Kumar <nanhe.kumar@gmail.com>
* List of all empty values
**/

$testCase = array(
    1 => '',
    2 => "",
    3 => null,
    4 => array(),
    5 => FALSE,
    6 => NULL,
    7=>'0',
    8=>0,
    
);

foreach ($testCase as $k => $v) {
    if (empty($v)) {
        echo "<br> $k=>$v is empty";
    }
}
/**
Output
1=> is empty
2=> is empty
3=> is empty
4=>Array is empty
5=> is empty
6=> is empty
7=>0 is empty
8=>0 is empty
**/
?>

Comment

PREVIOUS NEXT
Code Example
Php :: iqbal Laravel save record in two table in one line 
Php :: init curl 
Php :: laravel telescope tutorial 
Php :: laravel validation messages 
Php :: hint extension in visual studio code for laravel 
Php :: php += 
Php :: get id from object 
Php :: what are the different types of PHP variables? 
Php :: install multiple php versions windows 
Php :: laravel mass update relationship 
Php :: laravel stack script 
Php :: laravel all() 
Php :: laraval routing 
Php :: magento check which user has added a product 
Php :: array filter php get first object 
Php :: restart php service windows 
Php :: login as user in laravel from admin panel 
Php :: php delete file 
Php :: logout all users laravel 8 
Php :: laravel field types from database field type 
Php :: @can in laravel 
Php :: Laravel how to use @auth and @guest with multi authentication 
Php :: php page sends cookie to visitor 
Php :: open phpstorm from terminal 
Php :: upload image in laravel 
Php :: https://github.com/nuxt/nuxt.js/issues/8315#:~:text=%3Chtml%20lang%3D%22ru%22%20data%2Dn%2Dhead%3D%22%257B%2522lang%2522%3A%257B%2522ssr%2522%3A%2522ru%2522%257D%257D%22%3E 
Php :: wordpress remove noindex programmatically 
Php :: Storing login info in a session 
Php :: extract date from DateTime object php 
Php :: cpt change link 
ADD CONTENT
Topic
Content
Source link
Name
8+4 =