Some times, You will find yourself trapped into a situation where you need to change a column datatype or length, But this column is already used in PK-FK relationship and the solution for this is disable the SET foreign_key_checks = 0; then change the datatype and then re-enable it after you finish the update.
Some times you will face a problem with french?other language characters in your web page that are not being displayed correctly. Such as instead of apostrophe.. And the solution lies in sing the meta charset='utf-8' in your page header. and also to convert the encoding of this piece of data to utf. Sometimes you might find our this is encoded twice, then you will need to decode it or convert to iso then to utf-8 again. Here are some few suggestions
If you want to get a table column names from mysql database as a concatenated string, you can use the following code
This snippet will teach you how to scrape data from any website using guzzle http with php
If you have a table and want to swap two field values together, here is a simple snippet.
If you have data in an Excel sheet and would like to create a sql query to add/insert data here is the way,
this snippet will teach you how to disable dates before today in input type date
Sometimes you have a multi-dimensional array and you only need the unique arrays in it. here is a simple solution using pure php function
In case you wanted to increase memory size or loading or execution time here is this small snippet