I am trying to remove blank array from autocomplete data.I mean how to delete or remove blank array from autocomplete output list?
$(function() {
var available_tags=[ <?php
foreach(glob('../image/imagefiles/*.*') as $key=>$filename){
if($key==0)
{echo "'".$filename."'";}
else
{echo ",'".$filename."'";}
}
?> ];
$( "#tags" ).autocomplete({
minLength: 0,
source: available_tags,
});
});
<div class="ui-widget">
<input id="tags" size="50">
</div>
Output :.
..
image1
image2
Need Output :image1
image2