|
|
|
Home Credits Affliates Link Exchange HTMLshaman PHPshaman LINUXshaman Helpful Links Web Design Images Backgrounds Icon Sets GIF Images |
Language Intro : Structuring We will not go into the descriptions of whats an Integer, String, using the settypr() and etc as this may go on confusing you even more. Even when this would be the first to be touched on in any programming course, we found that it would not be necessary for you to start off in understanding programming trying to sort out what they actually are. And we will go right down to how to get these working and you will in time after some sessions of your own works get these encrypted into your head. In PHP, anything that is with a $ infront of them will be considered as a storage dump and will be used to stre a specific type of data, no mater if it is hard coded or if it is sent when a user enter in a form. Example : $test = "Testing text"; The script will understand that you want $test to be "Testing text" when you call for it. The good part about this is that you will not need to type in the value over and over again in the script which increases the size, but also it allows you to limit your errors in re-typing of is in any case you need to change a specific value to it later on. There are also some important operators that you need to know which you will be using in the course of programming your script. Comparing Left and Right (Comparison Operators) == : means equals to != : means not equals to === : means identical to and also the same type > : greater than >= : greater or equal to < : less than <= : less than or equals to example : $test == 200 $test != 19 Logic Operators || : left or right is true or : same as || && : left and right are both true and : same as && xor : left or right is true but not both ! : not true example : ( $test == 200 ) || ( $test2 == 50 ) We can also get variables to add, substract, multiple or divide from issuing the right operator. example : $test = 200; $test2 = 150; $test3 = $test + $test2; print "$test3"; The result to this would be the webserver giving you "350"
|
| Our Recommended Links |
|
|
Contact us at webmaster@galacnet.com for advertising opportunities on GalacNet. |