How-to articles, tricks, and solutions about PHP
Composer stores global packages in the "vendor/bin" directory within your system's home directory.
This error message is indicating that a database query has failed due to data being too large to fit into a specific column in the database table.
This error message typically indicates that there is a problem connecting to the database using PHP's PDO (PHP Data Objects) library.
The InvalidStateException is thrown by Laravel's Socialite package when the state parameter provided in the OAuth redirect URL does not match the one stored in the session.
You can use the ON DUPLICATE KEY UPDATE statement in your MySQL query when using PHP's mysqli or PDO libraries to accomplish this.
To install the php70-gd package on Ubuntu, you will need to have the package manager apt-get installed.
In Laravel, you can create a Request object on the fly by using the create method of the Request facade.
You can add a custom User Agent value to a cURL request in PHP using the CURLOPT_USERAGENT option.
You can use the strtotime function in PHP to add a certain number of minutes to a date and time.
In Laravel, you can use the withTrashed() method to retrieve all the rows, including the soft deleted ones, from a table.
Here's an example of how you can use the iCalcreator library to create an iCal file and output it for download:
The mysqli_stmt::bind_result() method binds variables to a prepared statement for result storage.
file_get_contents() is a built-in PHP function that is commonly used to read the contents of a file into a string.
In PHP, a variable can be evaluated as a Boolean value in an if statement without the need to explicitly compare it to true or false.
To save a file using FPDF, you can use the "Output" method.
In PHP, you can use the str_replace function to delete a particular word from a string.
The best way to give a variable a default value in PHP is to use the ternary operator ?:.
In PHP, you can use the get_headers() function to retrieve the headers of a remote file.
The file_get_contents function in PHP can be used to retrieve the contents of a file from a remote server.
PHPExcel is a library for working with Microsoft Excel files in PHP.
You can remove a child element with a specific attribute in SimpleXML for PHP using the xpath() function.
In PHP, you can use the strcasecmp() function to compare two strings and ignore case sensitivity.
To loop through a nested array in PHP using a foreach loop, you can use nested foreach loops.
This error message is indicating that there is a problem with the SQL syntax used in the query.
In PHP, you can execute multiple SQL queries in one statement by using the mysqli_multi_query() function.