Can you make an assignment on conditional statement in php as so:
if(siteName_err = isValid("sitename", $_POST['sitename'], false))
{
$siteName = $_POST['sitename'];
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes.
I think the most common use scenario for this is when using MySQL. For example:
This works because
$useris the result from the assignment. Meaning, whatever is stored in your assignment, is then used as the conditional. In other words,Both will print
int(5), obviously.