I want to do an autocomplete text box function, I have a php variable array say $vararray[]. it holds these values,
apple, bat, ball, bed, cat, dog, elephant, fox.
Now I want to make a textbox which is enabled with autocomplete textview.
when I click on that textbox, I need to populate first 4 values in that array.
now as i type in letters the suggestions in the textbox should appear relating to what I type in that textbox
like,
for b--> bat,ball,bed
for ba->bat,ball
I don't want to search in database. all the values are readily available in php array variable
is there any method to do that in jquery or ajax or in any other way?
availableTagsarray instead you just need to just provide source like thissource: YourArrayHere.