$item ) { if ( $item == '' || in_array(strtolower($item), $stop_words) || strlen($item) <= 3 ) { unset($match_words[$key]); } } $word_count = str_word_count( implode(" ", $match_words) , 1); $frequency = array_count_values($word_count); arsort($frequency); //arsort($word_count_arr); $keywords = array_slice($frequency, 0, $max_count); return $keywords; } function sentence_case($string) { $sentences = preg_split('/([.?!]+)/', $string, -1, PREG_SPLIT_NO_EMPTY|PREG_SPLIT_DELIM_CAPTURE); $new_string = ''; foreach ($sentences as $key => $sentence) { $new_string .= ($key & 1) == 0? ucfirst(strtolower(trim($sentence))) : $sentence.' '; } return trim($new_string); } if(isset($_GET['keyword'])) { $qext=" AND quote LIKE '%".$_GET['keyword']."%'"; } else { $qext=""; } if(isset($_GET['position'])) { if($_GET['position']=="teacher") { $qext.=" AND (vocation LIKE '%".$_GET['position']."%' OR vocation LIKE '%tutor%')"; } else { $qext.=" AND vocation LIKE '%".$_GET['position']."%'"; } } $num_rows = $mysqliextras->query("SELECT COUNT(*) FROM feedback WHERE reviewed=1".$qext.""); $num_rows = $num_rows->fetch_array(); $num_rows = $num_rows[0]; $allrows = $mysqliextras->query("SELECT COUNT(*) FROM feedback WHERE reviewed=1"); $allrows = $allrows->fetch_array(); $allrows = $allrows[0]; $pages = new Paginator($num_rows,9,array(10,20,50,100,250,'All')); //echo $pages->display_pages(); $start=$pages->limit_start; $end=$pages->limit_end; $quotes = $mysqliextras->query("SELECT quote FROM feedback WHERE reviewed=1".$qext.""); $allquotes=""; while($rows=$quotes->fetch_assoc()) { $allquotes.=$rows['quote']." "; } $res = $mysqliextras->query("SELECT * FROM feedback WHERE reviewed=1".$qext." ORDER BY added DESC LIMIT ".$start.",".$end."") or die('Db error'); $displaynum=(mysqli_num_rows($res)/2)+1; /*echo "

Page: $pages->current_page of $pages->num_pages

\n";*/ ?>

Most used words

fetch_assoc()) { $i++; if($i==1) { ?>
>
, ,

".$pages->display_pages(); //echo $pages->display_items_per_page(); echo "
"; ?>