Usually we do remove duplicate words from a text using array functions etc, but it’s quite slow doing that way because of the size of the text. The fastest way to achieve the same result is PHP regex. You can remove duplicate words using PHP regular expressions with preg_replace function. Also, read: Convert Associative Array […]
Author: PHPZAG Team
Converting a PHP Array to a Query String
We often need to convert a PHP array to a query string for use in a URL or POST request, and vice versa. Really, PHP is very rich with its build in functions as it has very useful function http_build_query() to convert a PHP array to a query string. Here in this post, I have an example […]
15+ regular expressions for PHP developers
In our previous tutorial, we have published PHP Code Snippets. In this post, we have published useful Regular expressions script for PHP developers. Regular expressions are really very useful which allows search, validation, finding, identifying or replacing text, words or any kind of characters. Here in this post, I’ve listed 15+ useful PHP regular expressions […]
PHP Script to Download Large Files Reliably
As a PHP developer, we often need to implement functionality to download files. But sometimes it needs to implement large files download in MB, GBs and that create many issues. So here I have created a simple PHP script to download large files .
Create Dynamic MySQL Record Inserter with PHP
As a PHP programmer, we always need to write INSERT statement repeatedly to insert records into database. This sometimes makes us annoyed to write same thing again and again in same script. To overcome this, we have created a generic insert script to handle all insert record by just passing array of table field name […]