Subscribe For Free Updates!

We'll not spam mate! We promise.

Aug 26, 2014

preg_replace to add something after closing tag - PHP

PHP - preg_replace to add something after closing tag : Here i will explain how to add something like string, char (or) any html tag after closing tag. Here we are using preg_replace() function to do it. In the below example, add <br /> tag after closing of all <img> tag. Syntax :     preg_replace('/(<img[^>]+>(?:<\/img>)?)/i',...

Aug 14, 2014

htmlentities() and html_entity_decode() in JQuery

htmlentities() and html_entity_decode() in JQuery : We are all know about use of htmlentities() in PHP. This function is used to convert all character to HTML entities. both function are used to treat string as a html and HTML as a string.        For Example :                  ...