php - How to check multiple variables if has values? -


how can check if has values if 1 missing echo else. try isset same, miss think.

$da1="da1"; $ba2=""; $za3="za3";  if (!empty($da1)||!empty($ba2)||!empty($za3)) {     echo $da1.$ba2.$za3; }else{     echo "one missing"; } 

my output :

da1za3 

use && instead ||

if (!empty($da1)  && !empty($ba2)  && !empty($za3)) {     echo $da1.$ba2.$za3; }else{     echo "one mising"; } 

Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -