Hey,
OK... This is what I want to do.
I want to display the contents of 2 tables ordered by name in a drop down box... Actually, writing this out makes it sound really simple... where am I going wrong??
I think the best thing to do is select the data I need from the 2 tables, bang it in an array, sort it, then display it. I've tripped up on stage 2 🙁
Not sure why I can't make this into an array - Here's the code I've done so far
<?
include('/home/sites/'.$HTTP_HOST.'/web/_includes/connect.php');
$cursor = mysql_query("select * from clientlogic.authlist");
$i = "0";
while ( $row = @mysql_fetch_array($cursor) )
{$name = $row["name"];$i++;
$arraybuild[$i] = "'$name'";
}
$cursor = mysql_query("select * from clientlogic.team_members where `ps` = '1'");
while ( $row = @mysql_fetch_array($cursor) )
{$name = $row["member"];$i++;
$arraybuild[$i] = "'$name'";
}
$the_array = implode (', ', $arraybuild);
$main_array = array($the_array);
echo $main_array[1]."<br>".$main_array[5];
?>
This prints nothing, however if I change $main_array[1] to $main_array[0], then it prints 'First Name', 'Second Name' etc etc
Maybe I'm going the long way round this.. if so please be nice and tell me the quickest / easiest way... There may be a pint in it for you 🆒