如何将“TRUE vars”替换为实际为真的变量?
例如:
<?php
$varONE = "I am not empty";
unset($varTWO);
unset($varTHREE);
if(empty($varONE) || empty($varTWO) || empty($varTHREE)) {
echo TRUE_ONLY . "vars are empty"
}
//to show a working snippet of code to provide the desired results:
if(empty($varONE)) {
echo "varONE is empty";
}
if(empty($varTWO)) {
echo "varTWO is empty";
}
if(empty($varTHREE)) {
echo "varTHREE is empty";
}
?>
所以结果会告诉我具体的varTWO和varTHREE是空的。 最终,目标是检查整个表单的输入值,确保所有12个输入都有一些值输入。