hi im new to php and was wondering if someone could explain wat an if statement is exactly.
thanx
Danny
Printable View
hi im new to php and was wondering if someone could explain wat an if statement is exactly.
thanx
Danny
An "if" statement evaluates the expression next to it, and based upon whether that condition is true or false, it executes the next set of lines of code.
for example
So only if the value of $i is greater than 4, will "do something" occur, else "do something else" will occur.PHP Code:if $i > 4 {
//do something
}
else{
//do something else.
}
thanx mendhak
Add [Resolved] to the thread title.