|
-
Jun 30th, 2005, 01:11 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] if statements
hi im new to php and was wondering if someone could explain wat an if statement is exactly.
thanx
Danny
Last edited by ninjanutz; Oct 12th, 2005 at 09:20 PM.
-
Jun 30th, 2005, 01:30 AM
#2
Re: if statements
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
PHP Code:
if $i > 4 {
//do something
}
else{
//do something else.
}
So only if the value of $i is greater than 4, will "do something" occur, else "do something else" will occur.
-
Jun 30th, 2005, 01:32 AM
#3
Thread Starter
Hyperactive Member
-
Jun 30th, 2005, 01:53 AM
#4
Re: if statements
Add [Resolved] to the thread title.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|