There are $wordCounter instances of $sw on this site

"; } function output($inputArray, $sw) { global $wordCounter; $return = ""; foreach($inputArray as $input) { if(strpos(strtolower($input), $sw) !== false) $wordCounter++; $return .= "

Facts About \"$input\"

"; $return .= "
"; } return $return; } function isPalindrome($phrase) { //removes spaces from phrase $phrase = str_replace(" ", "", $phrase); $phrase = str_replace("'", "", $phrase); $phrase = str_replace("?", "", $phrase); $phrase = str_replace("/", "", $phrase); $phrase = str_replace("\\", "", $phrase); $phrase = str_replace(".", "", $phrase); $phrase = str_replace(",", "", $phrase); //lower case the phrase $phrase = strtolower($phrase); //reverse phrase and assign to variable $revPhrase = strrev($phrase); //compare and return if($revPhrase == $phrase) return true; else return false; } if(!empty($_POST['search-word']) && !empty($_POST['pal-count'])) { $searchWord = $_POST['search-word']; $palCount = $_POST['pal-count']; } else header('location: .?error=true'); if (!isset($_POST['palindromes'])) { $displayPageContent .= '
'; $displayPageContent .= ''; $displayPageContent .= ''; for ($x=0;$x<$_POST['pal-count'];$x++) $displayPageContent .= '
'; $displayPageContent .= ''; $displayPageContent .= '
'; } else { $inputs = $_POST['palindromes']; $displayPageContent .= output($inputs, $searchWord); $displayPageContent .= wordCountOutput($searchWord); } ?> Palindrome Stuff