<?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?
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.
Sign up to join this community<?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?
You 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 Mar 12 '19 at 5:26