How-to articles, tricks, and solutions about PHP
This snippet is dedicated to one of the common PHP issues: how to convert a string to a number. You can easily do that by following the options we provide.
If you want to get the best solution to how to strip all spaces out of a string in PHP, you are in the right place. Read the snippet and choose your option.
In this tutorial, we display and describe the most flexible ways to add elements to an empty array. Follow the steps and you will manage that easily.
In this snippet, we will share with you the most flexible and powerful ways of sending post requests with the help of PHP. Just check out the examples.
Here is a short tutorial representing to you the most accurate PHP equivalent of .Net/Java’s to string. Read it carefully and check out the examples.
Here, we will assist you in finding the best way to increase the file upload size with the help of PHP arsenal. Read it carefully and follow the examples.
In this short guide, we will assist you to deal with one of the common issues in PHP: converting an integer into a string. Read it and follow the examples.
On this page, we are going to help you figure out the main ways of converting date formats in PHP.
On this page, we are going to provide you with a step-by-step guide on how to expire a PHP session after 30 minutes.
On this page, you will get solutions to a common issue in PHP: how to get the current year.
This short tutorial will represent to you the most effective way of returning JSON from a PHP script.
In this short tutorial, we are going to represent to you the most essential ways of getting current date and time in php.
One of the common errors that you can meet in PHP is the “Headers already sent” error. Here, we are going to show you the solution to such an error.
This tutorial includes several methods of generating a unique, random, alpha-numeric string with PHP. Follow the examples below, it will be easily done.
Here, we will share with you how to create a jQuery Ajax post request with PHP. Just check out the examples and choose the one that suits your needs best.
Very often, it is necessary to remove empty elements of the array in PHP. This snippet will provide you with the most common and efficient way to do it.
If you want to get a proper explanation of how to convert a PHP object to an associative array, you are in the right place. Just follow the examples.
On this page, you have an opportunity to get comprehensive information on how to calculate the difference between two dates with the help of PHP.
A common issue in PHP is removing the last character from a particular string. Here, you can find the methods that will help you to deal with this problem.
If you want to learn how to prevent SQL injection in PHP, as well as to get comprehensive information about SQL injections, you are in the right place.
In this short tutorial, we will provide you with the solution to one of the common issues in PHP: how to check whether a string contains a particular word.
In this short tutorial, you will find the most proper solution to the commonly asked question by programmers: how to delete an element from an array.
Often errors occur while executing a PHP application. Read this snippet to learn how to overcome difficulties and display such errors with the help of PHP.
Sometimes, the work with PHP requires to check whether a string starts or ends with a particular string. Learn how to do it with the help of our tutorial.
Often it is needed to collect clients’ IP addresses for security purposes or for tracking the site activity. Here, we will show you how to do it in PHP.