How To Display Array Elements with FOR Loop:

today i will show you how you can get the elements of an array and declare them into an string so you can use them later on in your script

for example, i have this database table where i have all my configuration for the site, so to get the elements or values of each configuration field i can use the while loop


$board_config = array();
$sql = "SELECT * FROM ".$db_prefix."config";
   $result = mysql_query($sql ,$db);
while ( $row = $myrow = mysql_fetch_array($result) )
{
   $board_config[$row['config_name']] = $row['config_value'];
}