How-to articles, tricks, and solutions about PHP
On this page, we cover a common issue that almost all the developers come across: generating one time password with PHP that can be reliable and helpful.
The double Not(!!) or the NOT NOT is one of the commonly used operators in PHP. Here, we will show you what it is and how to use it in your practice.
In this snippet, we will have a look at the process of generating and using default function parameter in PHP.
On this page, you can find comprehensive information about encrypting and decrypting a string in PHP. Learn how to do it with the functions of openssl.
While working with PHP, developers wonder how to append one array to another. This snippet is dedicated to the exploration of functions that help to do it.
In this snippet, you will find comprehensive information about the scope resolution. Explore the ways of using the scope resolution operator in PHP.
In PHP, an ampersand is put before the function name for returning a reference to the variable instead of returning the value. Learn how to do that, here.
The continue and break keywords are used to control the whole program flow. This snippet will show you examples of how to use these keywords in PHP.
Working with variables is an essential part of a developer’s life. In this snippet, we will demonstrate to you how to pass variables by reference with PHP.
Let’s dive deeper into the world of PHP. Here, we are going to discover the filter_var() function. Let’s see for what purposes it can be used in PHP.
The @ sign is one of the common used ones in programming. Let’s discover how it can be used in PHP together. Read on the snippet and check the examples.
In this short snippet, we will represent to you how to modify the session time out with the help of PHP functions.
While working with PHP, every developer should know how to use echo, print, as well as print_r. Read our snippet to learn about these crucial parts of PHP.
This tutorial can be quite helpful for you, if you are interested in using the PHP serialize() and unserialized() functions in your programming practice.
Imagine a given number and you want to check whether it is prime or not with PHP. Here, we represent two methods: a simple method and a more efficient one.
This short tutorial is dedicated to a common PHP issue "cannot use object of Type stdClass as an array". Read on to find the most accurate solutions.
Learn how to get the parameters from a URL string in PHP with the help of our short tutorial. Read on and check out the helpful examples below.
If you wonder how to find a proper way of converting MySQL data to JSON format using PHP, then you are in the right place. Read on and check the example.
The "invalid argument supplied for foreach()" is considered a common PHP error. With the help of this tutorial, you will figure out how to resolve it.
In this tutorial, you can find comprehensive information on how to read whether a checkbox is checked in PHP.
In this tutorial, we will show you handy solutions to implement once you encounter the fatal error: maximum execution time of 30 seconds exceeded in PHP.
If you want to learn how to set the HTTP header to UTF-8 in PHP, then read this snippet, examine and run the examples, that are demonstrated in it.
On this page, we will illustrate how to use PHP echo for printing JavaScript console. Here, you will find several options for different occasions.
This snippet gives you an opportunity to learn how to get the first element of an array using PHP. You can choose among the provided functions.
On this page, we represent to you the ways of getting the first five characters of a string in PHP. Keep on reading the snippet and check out the examples.