Subscribe For Free Updates!

We'll not spam mate! We promise.

May 21, 2014

MySQL query to trim particular character from database column field

MySQL has some default functions to trim particular cahr or whitespaces from all the column field in database rows. MySQL provide four type of methods to trim char. 1. TRIM() 2. TRIM(LEADING) 3. TRIM(BOTH) 4. TRIM(TRAILING) we can use above four methods in select, update and delete queries. 1. TRIM()     TRIM() function is used to remove...

May 20, 2014

Check String contains html tags and count of html tags using PHP

Here i will explain how to check the given string contains html tags or not.  this function return boolean value. // Function for check html tag presents function hasTags($str){  $htmlTags = array('A' ,'B', 'BODY', 'BR', 'BUTTON', 'DIV', 'FONT', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'IMG', 'INPUT', 'TABLE'); // Here you mention what...