You Are Viewing Posts Under Category: PHP Codes

How To Clean Or Sanitize String For File Name With Standards Using PHP?

Are you trying to come up with a function that does a good job of sanitizing certain strings so that they are safe to use in the URL (like a post slug) and also safe to use as file names? For example, when someone uploads a file I want to make sure that I remove […]...
Image-Color-Extract-Using-Simple-PHP-Without-Composer

Image Color Extract Using Simple PHP Without Composer

Have you ever wondered what kind of colours you should get to match your logo for your website? Here’s a very simple script that generates a colour palette for an image using the PHP GD library. This will help you find out which colours you can use to improve the quality of your site. The [&he...
How-To-Import-CSV-Files-Using-PHP-To-MySQL

How To Import CSV Files Using PHP To MySQL?

After knowing How To Export MySQL Database Tables To CSV Format Using PHP? its time to know about How To Import CSV Files Using PHP To MySQL?. The import and export of data to and from databases are a common enough procedure in PHP development. Another important activity is the backup and transfer o...
How-To-Export-MySQL-Database-Tables-To-SQL-Format-Using-PHP

How To Export MySQL Database Tables To SQL Format Using PHP?

The database backup is the most important task for every web developer. Regular database backup prevents the risk to lose the data and it helps to restore the database if any issue occurred. So, Export MySQL Database Tables whenever possible is a good idea. It is always good practice to take a regul...
How-To-Export-MySQL-Database-Tables-To-Excel-XLS-Using-PHP

How To Export MySQL Database Tables To Excel XLS Using PHP?

Export MySQL Database Tables is a familiar operation for many of us. phpMyAdmin is the go-to choice for a database client in PHP. It provides database administration tools and also allows Exporting MySQL Database Tables. The exported data can be in various formats like SQL, CSV as selected. This tut...
How-To-Export-MySQL-Database-Tables-To-CSV-Format-Using-PHP

How To Export MySQL Database Tables To CSV Format Using PHP?

PHP is widely used for building a wide range of products ranging from web apps to enterprise-level applications. The key to efficient PHP code is to follow proper workflows and automate processes. The result is high quality and bug-free code. In this post, we are going to discuss how can we create a...
How-To-Validate-Identify-Deprecated-HTML-Tags-In-A-WebPage-Using-PHP

How To Validate/Identify Deprecated HTML Tags In A WebPage Using PHP?

Deprecated tags and attributes are those which have been replaced by other, newer, HTML constructs. They are still included in the HTML draft or recommendation but are clearly marked as deprecated. Once deprecated, tags may well become obsolete. The draft “strongly urges” the nonuse of d...