Skip to content

Instantly share code, notes, and snippets.

@jarrettbarnett
Created October 18, 2016 20:53
Show Gist options
  • Save jarrettbarnett/73c2b0b34f891092514e6973fe6cd40b to your computer and use it in GitHub Desktop.
Save jarrettbarnett/73c2b0b34f891092514e6973fe6cd40b to your computer and use it in GitHub Desktop.
<?php
/**
* Test to see if a given string contains HTML tags
*/
function testIfContainsTag($input)
{
if (strpos($input, '<') > -1) {
return true;
} else {
return false;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment