Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?
Closed 6 years ago.
Improve this question<?php if(empty($username)) {array_push($errors, "Username is required")}; ?>
i put this line inside a php file but there is a problem with it, can someone explain what I'm doing wrong?
Closed. This question is off-topic. It is not currently accepting answers.Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?
Closed 6 years ago.
Improve this question<?php if(empty($username)) {array_push($errors, "Username is required")}; ?>
i put this line inside a php file but there is a problem with it, can someone explain what I'm doing wrong?
Share Improve this question asked Mar 12, 2019 at 5:17 Hesham SemisemHesham Semisem 1 1 |1 Answer
Reset to default 1You have misplaced ;
in your code, it should be
<?php if( empty( $username ) ) { array_push( $errors, "Username is required" ); } ?>
<?php if(empty($username)) {array_push($errors, "Username is required");} ?>
– Pratik Patel Commented Mar 12, 2019 at 5:26