How can I store information in a array?
I’m trying to get information from a database and then store HTML code in the array.
Is this possible? If so how?
function echothatshit() {
$sqll=mysql_query("select id,data from produkter where weight='1'");
$alla = array();
while($row=mysql_fetch_array($sqll))
{
$idd=$row['id'];
$data=$row['data'];
$alla[] = '<option value="'.$idd.'">'.$data.'</option>';
}
}
$test2 = echothatshit();
echo $test2;
1 Answer