PHP Web Development Tutorials

PHP Web Development Tutorials and Articles
  Title / Author Replies
Views Reverse Sort Order
This script adds some basic math functions to php allowing you to get percentages, ratios and other fraction based functions. Background I created this because I had a need for some math functions that php does not provide. I also made them for my math class to save on time from having to do...
Smarty is a templating engine for PHP, it's one of the most popular templating engine used by PHP developers. Using a templating engine helps businesses separate presentation logic & application logic. Templating, you can say is a way to separate the business logic from the presentation...
Mysqli extension provides us to access the functionality offered by MySQL 4.1 and above.The i in the function name stands for improved (MySQL Improved). The mysqli extension is built using the PHP extension framework.The MySQLi library is much more optimized and quicker than the previous MYSQL...
Allows you to include dynamically a single file, a list of files or a whole directory. No more tedious include statements. Background This is designed to be similar to Java's package system but instead uses a directory, file/s or */ALL, and include type(INC, IN_O, REQ, REQ_O). The reason is...
Here's a function which will format the passed bytes into KB,MB,GB...appropriately. function GetSize ($sizeb) { $sizekb = $sizeb / 1024; $sizemb = $sizekb / 1024; $sizegb = $sizemb / 1024; $sizetb = $sizegb / 1024; $sizepb = $sizetb / 1024; if ($sizeb > 1) {$size =...
PHP being the most popular & easy to deploy language for web applications offers a large number for functions for sorting compared to other languages like Perl, Python, etc which hardly have a few basic functions which have to be extended by the programmer. PHP reduces coding time by providing...
Creates a class that acts as a string wrapper similar to Java and C#. Background Php doesn't do types so I created a class to act as a wrapper to provide a faux type for strings The Code The code is designed so that you can create text variables which have there own methods that you...
Many times we require to format a number to output with thousand place comma separator, here is a function will help you do so. function numcomma ($value) { if(strpos($value,".")) { $decimalval = substr($value,strpos($value,".")+1); $value =...
We shall understand about the following loops in PHP. For loop statement The while loop The do while loop The foreach loop The continue statement The break statement For loop statement
The elements in array are stored in an ordered format. The mapping of the elements is in key value pair. User can define the length of the array. There are different types of arrays in PHP. They are as listed below: Numeric array: It defines an array with a numeric index. User can access and...
The following conditional statements are used in PHP. if statement if ….else statement if….elseif…else statement switch statement 1. if statement The statement is executed only if the condition is true.
The use of function is similar to other language functions, take one or more parameters as input, process and provide the corresponding result. The block of code to be used more frequently is added inside the functions. The execution of function is dependent on two points as create the function and...
Strings in PHP are similar to the ones used in other languages. They define a group of characters combined together to form a string. There are several string functions which can be easily used for data manipulation. User does not to perform separate installation. There are various...
Several protocols like POP3, IMAP and LDAP are supported. Various databases like Oracle, MySQL, PostgreSQL, Informix, Sybase, and SQL server can be easily integrated. Uses of PHP The database modifications like insert, delete and element modification is possible using PHP The system...
PHP tags Comments in PHP Executing PHP from command prompt Overview of variables Different PHP data types Scope of variables PHP tags The PHP tags are used by the user to divide the PHP code from the page elements. The content inside the tags is used and remaining is ignored by the...
Constants Operators in PHP Constants The name allocated to a value is known as constant. The value is fixed and cannot be modified by the user. It is case sensitive. The name of the constant starts with a letter, following numbers, letters, or underscores. It is case sensitive. The following...