How-to articles, tricks, and solutions about PHP

How to Get Multiple Selected Values of the Select Box in PHP

Learn how to get multiple selected values of the selected box in PHP. In our snippet, we provide you with comprehensive information and handy examples.

How to Sort an Array of Associative Arrays by Value of a Given Key in PHP

If you want to learn how to sort an array of associative arrays by value of a given key in PHP, then read our tutorial. Here, you can find handy solutions.

How to Pass an Array in URL Query String with PHP

In this short tutorial, you will find the way of passing an array in URL query string using PHP.

How to Send a PHP Email via SMTP with the PEAR

In this short tutorial, we are going to show you how to use the PEAR option to send emails via SMTP accurately. Just follow the steps below.

How to Get a File Extension in PHP

Here, we have collected five simple and efficient ways that will help you to get a PHP file extension. Check out the examples and choose the best one.

How to Convert a PHP Array to a JavaScript Array

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.

How to get the Query Builder to Output its Raw SQL Query as a String with PHP

If you want to grasp the way of getting a query builder to output its raw SQL query as a string using PHP, then you are in the right place.

How to Configure XAMPP to Send Email from Localhost with PHP

Here is a short tutorial that will assist you in configuring XAMPP to send email from localhost using PHP.

How to JSON Decode a String into an Array with PHP

This is a short guideline that provides comprehensive information on how to decode a JSON string into an array with the help of PHP.

How to Check if a Number is Odd or Even in PHP

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.

How to Push Both Value and Key into a PHP Array

In this short tutorial, you will find comprehensive solutions on how to push both value and key into a PHP array.

How to Convert DateTime to String in PHP

If you wish to manipulate with the DateTime object in PHP, then this snippet is for you. Here, you will learn how to correctly convert DateTime to string.

How to Find the foreach Index with PHP

Here is a short tutorial where you can find three helpful methods allowing to find the foreach index with the help of PHP.

How to Determine the First and Last Iteration in a Foreach loop?

In this snippet, we are going to figure out how to successfully determine the first and last iteration in a foreach loop with the help of PHP.

Where can php.ini be Found

This tutorial is dedicated to an issue that any developer may come across. It’s where to find the php.ini file. Choose among the three methods provided.

When to Use self and $this in PHP

This snippet is dedicated to the the main ways of using self and $this keywords in PHP. Here, you will learn how to use them and their main differences.

How to Remove the First Character of a String with PHP

In this short tutorial, we are going to represent to you the three main PHP functions that are used for removing the first character of a string.

How to Send Email Attachments via PHP

While sending a mail, it is often necessary to send attachments, too. In this snippet, we will show you how to send attachments with PHP mail easily.

How to Remove Warning Messages in PHP

In this short tutorial, we are going to represent to you a solution to a common PHP issue: how to remove warning messages easily.

How to Check if a Record Exists in a MySQL Database

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.

How to Split a Comma Delimited String to an Array with PHP

On this page, we are going to provide you with comprehensive information about a common PHP issue: how to split a comma delimited string into an array.

How to Get the Absolute Path to the Initially Run Script in PHP

In this short snippet, you will find a reasonable and accurate solution to a common PHP: how to get the absolute path to the initially run script.

How to Remove a Cookie with PHP

On this page, you will find practical and comprehensive information on how to remove a cookie with the help of PHP.

How to Create a New Line in PHP

In this snippet, we are going to describe how to create a new line with the help of the PHP arsenal. Go ahead and learn how to do it easily.

Where Does PHP Store Error Log

In this short tutorial, we are going to represent to you how to find where the PHP error log is located.