Sometimes we need to remove anchors from html while displaying html content. You can easily remove links or anchors from a html content using PHP preg_replace() function with regular expressions.
php
Sharing PHP SESSION Variables between Multiple Subdomains
As we know that the PHP session ids are saved in Cookies. To make a cookie available in all the sub-domains, we need to assign it to the root domain. Then all the sub-domains will get the session id from cookie and PHP can find the session using passed session id.
Working with php.ini file Configuration
Whether you’re novice or experienced PHP programmer, PHP.ini configuration is essential. It’s an important configuration file that is used to customize behavior of PHP at runtime. When PHP server starts up it looks for PHP.ini file first to load various values for settings. The php.ini file is where you can make changes to your PHP […]
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 […]