Hi there,

Thanks for the replies,

Andrew, yes the array has been defined, and is used later on in the
page to display a full list of items with again either Added or Not
Added depending on whether it is in the list created by the user.

So from that I have printed the array and it is as expected.

The bits are as follows:

----------In header file to build an array of the
data------------------

for($i = 0; $i < $totalRows_wtid; $i++) {
    $row_new = mysql_fetch_row($wtid);
        $my_array[] = $row_new;
  }

----------In Results
Page-----------------------------------------------------

        $newArray=array();
                array_flatten($my_array,$newArray);

print_r give the following

Array ( [0|0] => 12 [1|0] => 13 [2|0] => 4 ) So 12, 13, and 4 a re the
numbers I am trying to match.

Cheers


On Nov 10, 11:00 pm, "warden [Andrew Leach - Maps API Guru]"
<[EMAIL PROTECTED]> wrote:
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to