PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I am trying to find ways to make my code more efficient. One idea I had was to use If statements followed by including code if the statement is true. However, I wondered whether the PHP code of an include statement is parsed whether or not the If statement that precedes it is true.
In this example, the parser only checks whether the $variable is true or not. If it is true then only it executes othercode.php by including it. Otherwise it skips to execute the statement and the parser goes to next statement after if statement.
Thanks
Last edited by Benjamin on Fri Jun 12, 2009 5:41 pm, edited 1 time in total.
Reason:Added [code=php] tags.