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?
Here is the code
<?php do {
if (!in_array($row_allwineries['id'], $newArray, true)) <<< this
seems to fail
{
$addbutton = "Not Added";
}
else
{
$addbutton = "Already Added";
}
echo "var point = new GLatLng(" . $row_bizlist['lat'] . "," .
$row_bizlist['lon'] . ");\n";
echo "var marker = createMarker(point, '<div id=\"mapWindow\"
><strong>".$addbutton."<a href=details.php?id=".$row_bizlist['id']." >
".$row_bizlist['name']." </a></strong><br /><form method=post
name=form1 action=$editFormAction><input type=submit value=\"Add to My
Wine Trail\"><input type=hidden name=wtentryid value=><input
type=hidden name=username value=".$user->data['username']."> <input
type=hidden name=wineryid value=".$row_bizlist['id']."><input
type=hidden name=displayorder value=".$next_wt_id."><input type=hidden
name=MM_insert value=form1></form> <br/> ".$row_bizlist['address']."
<br /> Ph: ".$row_bizlist['phone']." <br/> <a target=_blank href= ".
$row_bizlist['website']." > ".$row_bizlist['website']." </a> <br /><a
href=mailto:".$row_bizlist[email]." >Email Winery</a> <br /></div>');
\n";
echo "map.addOverlay(marker);\n";
echo "\n";
} while ($row_bizlist = mysql_fetch_assoc($bizlist));
Cheers
steven
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---