programming languages tutorials |
Posted: 19 Dec 2012 09:02 AM PST String Operators As we have already seen in the Echo Lesson, the period "." is used to add two strings together, or more technically, the period is the concatenation operator for strings. PHP Code:
Display: Hello Billy! | ||||||||||||||||||||||||||||
Posted: 19 Dec 2012 08:58 AM PST Comparison Operators Comparisons are used to check the relationship between variables and/or values. If you would like to see a simple example of a comparison operator in action, check out our If Statement Lesson. Comparison operators are used inside conditional statements and evaluate to either true or false. Here are the most important comparison operators of PHP. Assume: $x = 4 and $y = 5;
| ||||||||||||||||||||||||||||
Posted: 19 Dec 2012 08:45 AM PST Assignment Operators Assignment operators are used to set a variable equal to a value or set a variable to another variable's value. Such an assignment of value is done with the "=", or equal character. Example: • $my_var = 4; • $another_var = $my_var Now both $my_var and $another_var contain the value 4. Assignments can also be used in conjunction with arithmetic operators. | ||||||||||||||||||||||||||||
Posted: 19 Dec 2012 09:06 AM PST Operators In all programming languages, operators are used to manipulate or perform operations on variables and values. You have already seen the string concatenation operator "." in the Echo Lesson and the assignment operator "=" in pretty much every PHP example so far. There are many operators used in PHP, so we have separated them into the following categories to make it easier to learn them all. • Assignment Operators • Arithmetic Operators • String Operators |
You are subscribed to email updates from programming languages tutorials To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
Post a Comment