Getting Array Elements Values With While Loop Show Display



Getting Array Elements Values With While Loop Show Display
Getting Array Elements Values With While Loop Show Display
Post Description:
Post Tags: getting, array, elements, values, with, while, loop, show, display
This Post Has Been Viewed 212 Times Since Sat Feb 23, 2008 5:47 pm Posted By hostman with 0 replies
Next Post »» how to make table with alternating color change colors each row
Getting Array Elements Values With While Loop Show Display
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'];
}



Leave Your Comments     [ dejar commentarios ]
  * Name     [nombre]

  * eMail (will not be published)     [coreo electronico]

* Enter Your Reply or Comments:    [commentarios]


Add Picture To Comments         [incluir foto]
YES NO             upload
Receive Replies on my Comments (An email will be sent to you when someone replies to your comments)

     

Comments and replies About Getting Array Elements Values With While Loop Show Display




(0) Comments