![]() ![]() If we changed to $number_three to anything besides the number 3. The if statement cannot evaluate to both true and false at one time! Here is what would happen If the condition is true, then take them to the 'Insert Your Name' page, else let her view the website as normal because you have already asked her for her name in the past. Note that the code within the if and else cannot both be executed, as Simply have a conditional statement to check, 'are you visiting for the first time'. ![]() On the other hand, if the if statement was false, then the code contained in the else segment would have beenĮxecuted. The code contained within the else segment will not used.All code that is contained between the opening curly brace "" will be executed when the if statement is true.$number_three is indeed Equal To 3 and so this statement will evaluate to true.To do such a comparison we use " =", which in English means "Is Equal To". In this example we compared a variable toĪn integer value.We first made a PHP variable called $number_three and set it equal to 3.This is a lot to digest in one sitting, so let us step through the PHP Tutorial PHP - Introduction PHP - Installation PHP - Syntax PHP - Variables PHP - Echo PHP - Strings PHP - Operators PHP - Comments PHP - Include File PHP - Require PHP - If Statement PHP - If.Else PHP - Elseif PHP - Switch PHP - Forms PHP - Functions PHP - Array PHP - While Loop PHP - For Loop PHP - For Each PHP - Do While PHP - POST & GET PHP - Magic Quotes PHP - htmlentities PHP Files PHP - File PHP - File Create PHP - File Open PHP - File Close PHP - File Write PHP - File Read PHP - File Delete PHP - File Append PHP - File Truncate PHP - File Upload PHP Strings PHP - strpos PHP - str_replace PHP - substr_replace PHP - Capitalization PHP - explode PHP - implode PHP Advanced PHP - Date PHP - Session PHP - Cookies Miscellaneous XML Tutorial Webhost Tutorial Flash Tutorial SEO Tutorial Scripting Javascript Tutorial PHP Tutorial Perl Tutorial Ajax Tutorial ASP Tutorial VBScript Tutorial Web Tutorials Beginner Tutorial HTML Tutorial CSS Tutorial
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |