Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm not that familiar with PHP, but this generally seems like you are unclear on the concepts. Note to readers: lack of response often indicates an unclear formulation of the question. </p> <p>Correct me if I'm wrong, but here is how I understand the problem from your description:</p> <ol> <li>You have a CSV of &lt;restaurant>,&lt;cuisine> pairs.</li> <li>You have an omnibox on a web page where a user can enter restaurant or cuisine.</li> <li>You want the omnibox to autocomplete based on the CSV.</li> <li>You want to use the jQuery autocomplete widget to help with this.</li> </ol> <p>The code you have presented tells a different story. The PHP code seems to be doing pretty much nothing. It stuffs a lot of data from a file into a <code>data[]</code> and then does nothing with it. I have no idea what that function produces.</p> <p>Setting that aside, the HTML you present is a <code>&lt;body&gt;</code> block that contains an input type and a label for that type. (That's okay for this kind of discussion.) </p> <p>The JavaScript/jQuery, however, is barely related. I don't see why UI items are expected to have a <code>label</code> and an <code>actor</code>. The general display of the auto-complete suggests you want to keep the restaurant and cuisine together and show them as a single selector but you want to have them select on either. This is not something the widget provides "straight out of the box" but it has hooks where you can add code to accomplish what you want. </p> <p>A good place to start is to realize that while the widget is helpful, it is not meant to deal with multivalued objects. You're going to have to do some significant customization. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload