I have a table that looks like this:
1 | Bopmem2 | Favorite Music | 2 | Bopmem2 | Test | 3 | Bopmem2 | Test1 |
I want to get "Favorite Music", "Test", and "Test1" into an array.
I would appreciate the help.
Your question is kind of vague. My vague answer is:
Select the rows (mysql manual has excellent instructions on how to write a select)
Assign the values returned into an array (the php manual explains how to do this).
$sql = "SELECT Topic FROM table WHERE username = 'Bopmem2';
$result = mysql_query($sql,$connection);
while ($row = mysql_fetch_array($result) { $topics[] = $row["Topic"]; }
will yield: $topics[0] = 'Favorite Music' $topics[1] = 'Test' $topics[2] = 'Test1'
I think....