About $variables, $hook,...
By: Arshad
4 Jan 2010Actually there are many ways this can be achieved. There are some efficient ways and some quick ones. Below is one quick and simple way of checking if a string has html tags or not.
/** * This function will return true is the string contains html tags and false otherwise */ function hasHtml($str){ //we compare the length of the string with html tags and without html tags if(strlen($str) != strlen(strip_tags($str))) return true; return false; }
Hello I'm Arshad. I'm a 21 years old Drupal Web Developer. This is a site i put up for some reasons i can't remember and this is where i write stuffs i need to remember.;)
In the Web world, i head the Drupal Mauritius User Group and the jQuery user Group Mauritius and i'm a campus representative for Mozilla Firefox.