array in and out
| From: | Chris Schneck | Date: | Mon, 20 Aug 2001 01:55:41 +0000 |
| Subject: | array in and out | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-63439@lists.php.net to get a copy of this message | ||
Since i have little experience with arrays, and the manuals / readme files
online havent been able to help me, I was wondering if anyone had any ideas
why this code doesnt work?
// get the keywords from db
$keyquery = ("select fld_keyword_word from tbl_keyword order by
rand()");
$keyresult = mysql_query($keyquery) or die ("couldnt randomize
words");
// put them into an array
while ($keyrow = mysql_fetch_array($keyresult))
{
$keyword[] = '$keyrow["fld_keyword_word"]';
}
// print the keywords with a function
$mykeywords = implode(", ", $keyword);
function print_keywords()
{
echo ($mykewords);
}