All posts by caninfotech

Looping in PHP – For, While and DoWhile

Loops allow you to repeat certain lines of code. The code is executed repeatedly until a condition is met. This saves you time and also decreases the number of lines of code that you need to have. For Loop This loop specifies the condition and repeats the statements as long as the conditions are met.

Conditional Statements in PHP – If/Else/Switch

Conditional statements are used to test conditions in PHP. You test a certain condition and then perform an action based on the condition. Like when a condition is true do this and when the condition is false, do this instead. These statements make use of the logical as well as comparison operators for forming conditions.

Comparison and Logical Operators in PHP

Operators in PHP are used for different tasks like comparing or incrementing/decreasing values. They are also used to test logical operations. There are many types of operators that you will be using in PHP. They can be grouped according to their usage. Two main types of operators are comparison and logical operators. These conditions usually

11 Useful PHP Math or Arithmetic Functions

PHP is rich with inbuilt functions that can save you a lot of time and effort. There are several mathematical functions present in PHP which allows you to do a lot within a few lines. Here are the most frequently used php math or arithmetic functions: ceil(), floor() and round() These three functions are used

25 Extremely Useful PHP String Functions

There are a lot of php string functions and they are very useful. These functions are used to perform operations with string values. You can change cases, search within strings, count the characters, trim them etc. Here is the list of some extremely useful php string functions along with their usage examples: strtoupper() and strtolower()

Variables and Consants in PHP – Strings and Numbers

Variables store values in them. They can change as you perform operations. For example, you store a value like the number 5 in a php variable. Then you perform operations like additions, subtractions etc. The first thing that you require for a variable is a name. PHP has the following rules for variable names: Variable

Mixing PHP/HTML and Commenting in PHP

The primary use of PHP is to build websites and web applications. Since browsers use HTML and JavaScript to render websites, the output generated by PHP is in HTML. The HTML codes that you see in websites like Facebook are the output after PHP processed it. PHP code is mixed with HTML tags to produce

Introduction and Basics of PHP

PHP is a very popular web programming language used for building dynamic websites. When combined with HTML, CSS and MySQL databases it becomes a very useful language for building websites. If you want to develop websites, then PHP becomes a basic requirement. I have been using PHP, MySQL, HTML and CSS for developing websites for

1 9 10 11


Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 2 other subscribers