I have this code :
$stopwords = array("acara", "ada", "adalah");
foreach ($stopwords as &$word) {
$word = '/\b' . preg_quote($word, '/') . '\b/';
}
$filter=preg_replace($stopwords, '', $case);
$kata = str_word_count($filter,1);
$jumlah = count($kata);
function myfunction() {
for($i=0; $i<$jumlah; $i++){
echo "$kata[$i]";
}
}
myfunction();
When I run my code, myfunction
doesn't display the output data. How to get output with that function?