A different approach to searching an associative array with PHP
A different method to finding values in an associated or nested array rather than use a loop. Looping The seemingly easiest way is to do a loop and when the…
PHP backend web language
A different method to finding values in an associated or nested array rather than use a loop. Looping The seemingly easiest way is to do a loop and when the…
Two handy and complimenting string functions in PHP that assist with string manipulation and any tasks involving breaking down a string. The first function is strpos which finds the position…
How to return numerics in JSON data from a PHP PDO MySQL query. Usually and as default all of the data is returned as strings. The following example SELECT code:…
How to check if a file exists on a remote server or network from a URL with PHP. Using file_exists() only works for directory links (files on the system) and…
Generating an XML file with data from a MySQL database using the inbuilt SimpleXMLElement class. By using this class you can avoid formatting errors and issues than if you were…
How to POST JSON data or a file in PHP including receiving the POST request and saving it to a file. This is done with the easy to use PHP…
A simple method to validate a date or check the date is true to the Gregorian calendar in PHP by defining the month, day and year. PHP checkdate() will return…
How to load a SQL query from a file instead of having an inline query. This is done to help with formatting and easier understanding of the code. All that…
Effectively manage PHP MySQL inserts from a large loop using the PDO connection. The key is to avoid committing data on each loop, this is done using a transaction. Use…
How to enable the GD image library for PHP 8 with XAMPP on Windows. All that’s needed is a simple php.ini file edit. Enable GD PHP 8 XAMPP To enable…