php tutorial

PHP String Variables

Submitted by admin on

A string variable is used to manipulate any character stored in a variable you declared.

This chapter will discuss common function you can use to manipulate string variables.

Some common functions are:

  • The Concatenation Operator
  • The strlen() function
  • The strpos() function

The concatenation operator is very useful to combine two string values.

Example:

PHP Variables

Submitted by admin on

A variable is used to store any value that you like.

You can reuse variable in any block of code in your PHP script.

PHP variables must start with a dollar ($) sign.

PHP Variable Syntax

$variable_name = value;

Below is an example of how to use variables in PHP:

PHP Syntax

Submitted by admin on

If you came from other programming languages like c/c++ and or Java, you will not have difficulty understanding PHP syntax as they have the same thing in common.

But unlike c/c++ or Java, PHP script is executed on the server and can be inserted within any HTML code and must start scripting block with <?php and end with ?>.

Below is an example of PHP file:

Install WampServer

Submitted by admin on

Before we start working with PHP/MySQL, you need to install WampServer first in your local computer. WampServer will allow you to run PHP script in your local computer without accessing live server.

Running PHP script locally will also speed up your development.

First download WampServer from http://www.wampserver.com/.

Download WampServer

In step # 3 select 32bit or 64bit.

What is PHP

Submitted by admin on

PHP is one of the best scripting language alternatives to Microsoft’s ASP. PHP is known as the language used by popular Content Management System or CMS like WordPress, Drupal, and Joomla.

PHP is used along with MySQL as the database backend. Both software are free and is licensed under GNU.

In this tutorial you will learn how to make PHP script using step-by-step procedure.

PHP Tutorial

Submitted by admin on
PHP is the best scripting language out there and it's the widely used language for the Web. In this tutorial you will learn how to use PHP and MySQL as the database backend. In the first chapter of this tutorial I will teach you the basic of PHP, the syntax and how you can access and manipulate SQL Databases.