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. (more…)
November 30, 2005
PHP Operators
Php Include Function
PHP Include Function
Without understanding much about the details of PHP, you can save yourself a great deal of time with the use of the PHP include function. The include function takes a file name and simply inserts that file’s contents into the script that calls used the include function. (more…)
PHP If Statement
PHP If statement
The PHP if statement is very similar to other programming languages use of the if statement, but for those who are not familiar with it, picture the following:
Think about the decisions you make before you go to sleep. If you have something to do the next day, say go to work, school, or an appointment, then you will set your alarm clock to wake you up. Otherwise, you will sleep in as long as you like! (more…)
PHP Commenting
Commenting In PHP
The PHP comment syntax always begins with a special character sequence and all text that appears between the start of the comment and the end will be ignored by the browser.
PHP’s comments will not be displayed to your visitors when they visit the your page. The only way to view PHP comments is to open the PHP file for editing. This makes PHP comments only useful to PHP programmers. (more…)
PHP Data Types
Data Types in PHP
In PHP the data type of a variable is not set by the programmer. PHP decides the data type of variables after interpreting the web page. Data Types in PHP include:
Numeric data type
String data type
Array data type
Numeric data type (more…)


