Skip to content
/ notes Public

my notes for development, it may be useful sometimes when I forget something, so I try to look for it here if I already done it before.

Notifications You must be signed in to change notification settings

itzmj-23/notes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

notes

my notes for development, it may be useful sometimes when I forget something, so I try to look for it here if I already done it before.

PHP

empty

I encounted in <input type="number"> that even the field is empty, the empty() is not returning true;

I have found it in Stackoverflow.

$quantity = $_POST['quantity'];
foreach ($quantity as $key => $value) {
  if (empty($value)) {
     unset($quantity[$key]);
  }
}
if(!empty($quantity)){
  echo 'not empty';
} else {
  echo 'empty';
}

get form input array into PHP array

Stackoverflow

About

my notes for development, it may be useful sometimes when I forget something, so I try to look for it here if I already done it before.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published