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. Continue reading

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. Continue reading

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. Continue reading

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. Continue reading