Learn PHP with Sample PHP Code

What does it mean to be an Advanced PHP Programmer?

On a previous post I had someone comment that they did not agree that the code implementation that was presented in the article was advanced (which was described in the title). They also claimed that I was not an advanced PHP programmer.

This made me think. Not because my programming skill or knowledge was challenged. But because I’m not sure what makes code or a programmer “advanced”. This article is meant to take a look at this from an analytical perspective. I’m less concerned about general labels, and more concerned in how to improve going things going forward. Read More…

Advanced PHP Form Validation

Last year I wrote an article in how to implement basic validation for a form with PHP. I decided to re-look at this and improve what I did in that article. This time we are going to make a more advanced PHP form that is more responsive and effective.

This PHP sample code has many advantages over the previous article. Not only that, but for the most part it is easier to implement with more complexed forms where you need more than basic validation. Read More…

Sample PHP Code: PHP Recursive Functions

Use PHP Recursive Functions to create PHP code that dynamically grows with your data. This will save you time and confusion, and understanding PHP recursive functions will make your PHP code much more scalable. At first, it may be a confusing concept to grasp (especially for PHP beginners).

Learn how to create recursive functions by taking a look at this sample PHP code. Read More…

Sample PHP Code: PHP For Loops, Foreach, While and Do While

There are different PHP loops: PHP for loops, foreach, while, and do while loops. There are advantages and disadvantages to each type of PHP loop (depending on the scenario), and it is beneficial to understand how to work with them.

This PHP sample code should help you get a basic familiarity with creating and using PHP loops. Read More…

Sample PHP Code: PHP Variable Variable

The ability in being able to make a PHP variable name dynamic can be very useful. As long as you are confident in the data you are working with, this is a safe alternative in working with complex data systems and can make your PHP code more robust. Read More…

Beginning PHP Part 2: Learn PHP Functions and Security

Getting a basic familiarity with PHP is not difficult, but if you don’t understand a few key elements you will find it difficult to work with. This beginning PHP series is meant to help you learn PHP. In this tutorial we take it to the next level and get down and dirty with PHP functions and take a look at basic PHP security.

This beginning PHP tutorial is part two in the series. Take a look at part one of the Beginning PHP series if you haven’t already. Read More…

Beginning PHP Part 1: Working with Variables

Getting a basic familiarity with PHP is not difficult, but if you don’t understand a few key elements you will find it difficult to work with. This beginning PHP tutorial attempts to break down a few of the core PHP programming elements through simple examples and descriptions. Read More…

PHP Form Validation

If you program custom PHP applications, you will often times need to work with a form and require certain form fields. A few real world examples would be a contact form, registration form or signup form. This form validation with PHP tutorial shows you a simple and quick method for creating a form page that handles errors and pre-populates fields if there is an error, and a method for processing the php form and validating the information. Read More…

The Most Useful Piece of PHP Code – Looping through Arrays

Working with and looping through arrays is one of the most useful things you can learn how to do with web applications. Anything from forms, API’s to configuration values, arrays make it easy in working with values. Take look at this simple example that illustrates the basics in working with the $_POST array. Read More…

PHP Script Tips: Cool Secrets of PHP

Over the years I’ve come across some things in PHP that are not obvious, but are worth mentioning. This is not meant to be a comprehensive list of all of the useful tricks that you can do with PHP. If you have anything to add to the tips, please comment! Read More…