Autocomplete source file

Autocomplete source file

Hello,

I am trying to add the Autocomplete feature to my website. It works fine if I list my data right after the "source:" tag like below,

$( "#tags" ).autocomplete({

source: ["Item 1", "Item 2"]

But I would like to use a local file as the data source. When I put the same data in a local file and put the file name as the source as in the example below, the autocomplete does not work. 

$( "#tags" ).autocomplete({

source: "data.php"

Can anyone help me with my problem?

Thanks,

Todd