On Nov 10, 9:24 am, deepweb <[EMAIL PROTECTED]> wrote: > Hi there, > > I am using an if then conditional to produce buttons to say either > "add" or "added" to a list of wineries for a user controlled list. > > In php this works fine, but in the maps popup, I cant get the > conditional to work. > > I think it is actually the in_array() that isnt working, as the if/ > then fails everytime. > > Are you able to run php functions inside the mapping lines?
Of course. PHP is executed on the server as the page is sent to the browser. It alters what is sent to the browser: where you have $addbutton in your echo statement, the browser will receive either "Not Added" or "Already Added". But: in your code snippet you never set $newArray. If that array is empty, or is not populated with data which EXACTLY matches $row_allwineries['id'] including its data-type, then in_array will fail. Strings are case-sensitive. Andrew --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---
