Currently, my typeahead looks like this when I am creating it in php
echo '<input type="text" style="margin: 0 auto;" data-provide="typeahead" data-items="4" data-source="[,';
while ( $rowresult = mysql_fetch_assoc($titlequery) ) {
echo '{value:"'.htmlspecialchars($rowresult['title']).'"'."},";
}
echo ']">';
It outputs like this:
<input type="text" style="margin: 0 auto;" data-provide="typeahead" data-items="4" data-source="[,{value:"2010-11 Graf Intern"},{value:"2nd Year Finance Explorer, Mizani & L'Oreal Technique"},{value:"A&R Intern"},{value:"Account Executive"},{value:"Account Manager"},{value:"Account Service Representative"},{value:"Account Strategist"},{value:"Accountant"},{value:"Accounting Intern"},{value:"Accounting Intern/Analyst"},{value:"Accounts payable"},{value:"Acquisition Marketing Intern"},{value:"Acquisitions Associate"},{value:"Acting Manager"},{value:"Acting Software Manager"},{value:"Administrator"},{value:"Admissions Ambassador"},]">
Unfortunately, it only shows the first character of each value it is able to find (value being the default for bootstrap.)
Edit:
The question revolved around formatting results, in actuality, what was happening was Javascript was trying to reference an array that didnt exist, so it took the element [0] which was the first character to it.
Try to use this solution: