Comparing strings

The primary function used to compare strings is strcmp (). As the only 2 parameters it accepts text strings which are to be compared. This function returns 0 if the…

READ MORE

Regular Expressions

PHP supports 2 types of regular expressions: POSIX and those used in Perl. Regular expressions are strings that can be adapted to various other strings. This can be compared to…

READ MORE

Sessions

Session mechanism allows the passing of parameters between pages easily. The variables are stored on the server side and the client kept only the session ID browse around this website….

READ MORE

Cookies

Cookies It is a method of storing small amounts of data on a computer viewer page (eg. The information about the first and last name or user name on this…

READ MORE

Upload File

Often there is also a need to transfer a file to the server, for example by adding a photo to the gallery. The file is transferred using the form field…

READ MORE

Forms

Forms If you have to give some data (eg. To be added to the database), then the only way is to download them from the standard HTML form. In most…

READ MORE

The range of variables

The range of variables When you use the functions and classes there is a problem range of variables. This problem applies to most programming languages. Variables are usually available only…

READ MORE

Classes

Classes

The object has its own properties and can do with it different things. Class is not an object, but its definition (eg. The class is a dog, but not the specific copy). The class definition contains variables (object properties) and function (what you can do with these objects). By using such a convention programming time can be easier to describe the interactions between objects. Here’s how to define a sample class and examples of actions on it.

Example
<?php

// Start the class definition Basket – defining basket shop
class Cart

READ MORE

Functions

Functions The function is a piece of code that can be called using the name. We have already been given several functions provided by PHP, such as array (), each…

READ MORE