When I do something like this:
$query = mysql_query("INSERT INTO something (something) VALUES('".$something."')");
if($query){
//do stuff
}
or
$mailstuff = mail($to,$subject,$message,$headers);
if($mailstuff){
//do stuff
}
Which part of the code actually executes the function? The if or the declaration? References appreciated.
Thanks
Here is what will be done (in the correct order) :
mail($to,$subject,$message,$headers)mailfunction has returned something. This something is assigned to$mailstuff.ifstatement will check if the something in$mailstuffis somewhat equal totruePlease not that contrary to what you suggest in your comment, the server will parse all the code before actually executing it.