Jump to content

array problem


firelior

Recommended Posts

Hi,
I got this array:
[code] while($row = mysql_fetch_assoc($result))
{
$elements[] = $row;
}
        return $elements;
[/code]
now I want to extract it.
I don't have the database or anything I tryed this:
[code] $option=$elements;
foreach ($option as $key => $val){
foreach ($option as $val){
echo "<option>$val</option>";
}
}[/code]
Link to comment
https://forums.phpfreaks.com/topic/21671-array-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.