Regular expressions in PHP
Regular expressions is a special text string for describing a search pattern. Regular expressions are used to
1) Search a string inside a string
2) Replace strings
3) Split strings
4) Data Validation (email address, IP address)
PHP troubleshooting – Browser shows the PHP code instead of running it.
You have written your first PHP script and seeing the code in the browser instead of running the script? Here are few quick tips that will help you fix this issue. Make sure you have a web server set up to run PHP. Even though most web servers support PHP, you can confirm it by […]
PHP classes, objects, methods and properties
Object-oriented programming (OOP) is more advanced and efficient way of programming than the procedural style. OOP helps you in better code organization and reduces repeat of code. OOP concept was added to php5, to build complex and reusable web applications. The OOP in PHP starts by creating a class. Here is how we create a […]
Troubleshooting and Debugging techniques for PHP programmers
First thing to do while troubleshooting your code is enabling error reporting.You can start by including the below two lines of code at the start of your PHP script. ini_set(‘display_errors’,1); error_reporting(E_ALL); There are four types of errors in PHP. 1. Syntax ErrorsSyntax errors are caused by typo in your code. A missing semicolon, parenthesis or […]
Top 5 PHP Security tips
PHP Security: Top 5 tips Input data validation 1) input data validation is an integral part while developing an application. It is easy to hack your application if there is no data validation in place for user inputs. Make sure you validate the data executed by eval() if you ever want to use eval() in […]