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

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -