I guess it's because I didn't really follow Niklas' post, so I'll ask the first part of yesterday's question again, if someone can help me think my way through it. I've been looking at http://www.php.net/manual/en/ref.array.php but don't really get HOW to build an array from my MySQL data.
I'm exploding data from $mydata->KW explode(";", $mydata->KW); (It's a bunch of author names separated by ; in a bibliographic database.) I want to compile everything in One Single array, called $authors and output it to the screen. Later, I'll aphabetise and sort the output ... Where/How do I start in building a new array? ".=" doesn't work: $authors .= explode(";", $mydata->KW); How do I construct the array? Will I be able to alpabetise it? -------------snip------------------ $myconnection = mysql_connect($server,$user,$pass); mysql_select_db($db,$myconnection); $news = mysql_query("select KW from $table"); while ($mydata = mysql_fetch_object($news)) { $authors .= explode(";", $mydata->KW); } foreach ($authors as $author) { echo "$author<br>\n"; } John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php