Hey..
I have a row in my mysql table called member_of_ladder.
in that row is data formatted like so Night lance; cool; test1; test2;
now what I'm looking to do is drop the ; and put the values into a drop down menue.
so..
where is what i have so far.
require('/homepages/13/d153872232/htdocs/nightlance.com/match/main_mysql.php');
$string=("SELECT member_of_ladder from Users where username='$username'");
$query=mysql_query($string, $db) or die ('error while getting a list of ladders for which you belong to. <br />'.mysql_error());
while ($result=mysql_fetch_assoc($query))
{
$game=explode(";", $result['member_of_ladder']);
echo '<option>'.$game'</option?';
}
now that only gives me one option. and not all three. how come?
when i try and do an implode.... like so
require('/homepages/13/d153872232/htdocs/nightlance.com/match/main_mysql.php');
$string=("SELECT member_of_ladder from Users where username='$username'");
$query=mysql_query($string, $db) or die ('error while getting a list of ladders for which you belong to. <br />'.mysql_error());
while ($result=mysql_fetch_assoc($query))
{
$game=explode(";", $result['member_of_ladder']);
$test=implode(" ",$game);
echo '<option>'.$test.'</option?';
}
i get all the vaules seperated by a space... but they are not different options. instead they are all on one line.
can you help me??