Tag learn php iampsp

PHP Strings

A string is a sequence of characters, like “Hello world!”. Strings Strings in PHP are surrounded by either double quotation marks, or single quotation marks.

PHP Data Types

PHP Data Types Variables can store data of different types, and different data types can do different things. PHP supports the following data types: String Integer Float (floating point numbers – also called double) Boolean Array Object NULL Resource

PHP echo and print Statements

PHP echo and print Statements With PHP, there are two basic ways to get output: echo and print. In this tutorial we use echo or print in almost every example. So, this chapter contains a little more info about those…

PHP Variables Scope

PHP Variables Scope In PHP, variables can be declared anywhere in the script. The scope of a variable is the part of the script where the variable can be referenced PHP has three different variable scopes: local global static

PHP Variables

Variables are “containers” for storing information. Creating (Declaring) PHP Variables In PHP, a variable starts with the $ sign, followed by the name of the variable: Example $x = 5; $y = “John”; In the example above, the variable $x…

PHP Multiline Comments

Multi-line Comments Multi-line comments start with /* and end with */. Any text between /* and */ will be ignored. The following example uses a multi-line comment as an explanation:

PHP Comments

Comments in PHP A comment in PHP code is a line that is not executed as a part of the program. Its only purpose is to be read by someone who is looking at the code. Comments can be used…

PHP Syntax

A PHP script is executed on the server, and the plain HTML result is sent back to the browser. Basic PHP Syntax A PHP script can be placed anywhere in the document. A PHP script starts with <?php and ends…

PHP Installation

What Do I Need? To start using PHP, you can: Find a web host with PHP and MySQL support Install a web server on your own PC, and then install PHP and MySQL Use a Web Host With PHP Support…