How-to articles, tricks, and solutions about PHP
Increment value in MySQL update query
To increment a value in a MySQL update query using PHP, you can use the += operator.
How to create and download a csv file from php script?
To create and download a CSV file from a PHP script, you can use the following steps:
Remove portion of a string after a certain character
There are several ways you can remove a portion of a string after a certain character in PHP.
How to access mysql result set data with a foreach loop
To access MySQL result set data with a foreach loop, you can use a loop like the following:
Nginx serves .php files as downloads, instead of executing them
There are several reasons why Nginx may serve PHP files as downloads instead of executing them.
How do I add PHP code/file to HTML(.html) files?
To add PHP code to an HTML file, you will need to use PHP tags.
How to get client IP address in Laravel 5+
In Laravel, you can get the client's IP address by using the Request facade's ip method.
The openssl extension is required for SSL/TLS protection
The openssl extension in PHP is required to provide SSL/TLS support.
How to set upload_max_filesize in .htaccess?
To set the upload_max_filesize directive in an .htaccess file, you can use the following code:
How to get everything after a certain character?
You can use the strstr() function to get everything after a certain character in a string.
correct PHP headers for pdf file download
To download a PDF file in PHP, you will need to use the appropriate HTTP headers.
Facebook Graph API, how to get users email?
To get the email of a user through the Facebook Graph API, you will need to follow some steps.