jimfog Posted May 9, 2012 Share Posted May 9, 2012 Suppose that we have an if statement that does not work-,it is a logic error-, does such a statement outputs false? Not in the browser I mean as en echo statement. Link to comment Share on other sites More sharing options...
ShadowMage Posted May 9, 2012 Share Posted May 9, 2012 I think you'll need to go into a little deeper explanation. Maybe provide a sample code snippet. Link to comment Share on other sites More sharing options...
justsomeguy Posted May 9, 2012 Share Posted May 9, 2012 It's not valid to echo an if statement, an if statement doesn't have a value. The conditions it evaluates have values, but not the actual if statement. Link to comment Share on other sites More sharing options...
jimfog Posted May 10, 2012 Author Share Posted May 10, 2012 Never mind, I found the solution to my problem. Link to comment Share on other sites More sharing options...
boen_robot Posted May 13, 2012 Share Posted May 13, 2012 Suppose that we have an if statement that does not work-,it is a logic error-, does such a statement outputs false?For future reference's sake...Whenever something "does not work", that's "an error" in general. The different kinds of error determine the point at which your solution must be applied.- "Compile time" or "Syntax errors" are errors that occur because you're writing something that can't be compiled/interpreted. "SELECT * FROM `users`" is meaningful to SQL, but is meaningless in PHP, while "<?php echo 'TEST';?>" is meaningless in SQL, but meaningful in PHP.- A "Run time error", in desktop programming terms, is one in which the program is compiled, but is not executed afterwards for whatever reason and/or crashes. In PHP terms, that's when you get error messages (assuming you have error display/logging enabled).- A "logic error" is one where your program compiles and executes, without any error messages, but produces unexpected results. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now