/** * Flush output buffer */ function myFlush() { echo str_repeat(' ', 256); if (@ob_get_contents()) { @ob_end_flush(); } flush(); } $current = 0; $img_ids = count($imgid); echo '<div class="progress">'; foreach ($imgid as $key => $value) { $tg = $TAG->tagsearch($value); $percentage = round($current / $img_ids * 100); outputProgress($current, $img_ids); //echo "<div class="progress-bar progress-bar-info progress-bar-striped" role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100" style="width:'.$percentage.'%"></div>"; $current++; if (!empty($tg)) { foreach ($tg['photo']['tags']['tag'] as $tag) { $tagquery = strtolower(trim($tag["raw"])); $data = preg_split("/\\s|\\,|\\-|\\_/", $tagquery); if (!empty($data)) { $i = 0; while ($i < count($data)) { $tagsWord = $data[$i]; if (!in_array($tagsWord, $stopwords)) { $class_word[$count1++] = depluralize($tagsWord); $taglist[] = depluralize($tagsWord);