How-to articles, tricks, and solutions about PHP
To change the PHP version for your website using an .htaccess file, you can use the AddHandler directive.
You can check if the $_GET array is empty by using the empty() function.
In PHP, you can use the DateTime class to check if a date is within a given range.
This is a short snippet that explains how to check whether a number is odd or even in PHP. Check out the handy methods and examples of our tutorial.
To check if a PHP session is empty, you can use the empty() function.
In this tutorial, we are going to represent to you two handy options of how to check if a record exists in the database with PHP.
You can use the rowCount() method of the PDOStatement object to check if a row exists in the database using PDO.
In PHP, you can use the substr() function to check if a string starts with a specific character or substring.
In Symfony2, you can check if an object is not an instance of a certain class using the "instanceof" keyword in combination with the "!" (not) operator.
To check if an array is associative or sequential in PHP, you can use the array_keys() function and compare the resulting array of keys with the original array.
In PHP, you can use the "is_array" function to check if a variable is an array.
To check if PHP is installed on your Ubuntu system, you can use the following command:
You can check where Apache is looking for the php.ini file by running the command php --ini in the command line.
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.
On this page, we represented to you the three principal ways that allow programmers to detect whether a given array is empty or not. Just see the examples.
In PHP, you can use the $_FILES superglobal array to check if a file has been uploaded.
Here is a short tutorial that will assist you in configuring XAMPP to send email from localhost using PHP.
On this page, we are going to help you figure out the main ways of converting date formats in PHP.
In this tutorial, you can find a comprehensive guideline on how to convert a PHP array to JavaScript accurately. Just check out the options and examples.
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.
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.
You can use the json_decode function in PHP to convert a JSON string into a PHP object.
To convert an image to base64 encoding in PHP, you can use the base64_encode() function
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.