Getting Array Elements Values with While Loop Show Display

Mobile
feeds
Welcome Login | Register

Getting Array Elements Values with While Loop Show Display
Reply Your Comments:
Click this button if you are interested in replying to this topic and leave your comments
Sent To Friend
CLick this button if you want to send this page to a friend.
Subsribe To Rss Feeds
Subscribe to RSS
CLick this button if you want to subscribe to this RSS Feed. You can use your browsers feeds burners if you have mozilla or internet explorer 7 or higher and keep up with updates.
  Forums Index
      » Snippets Forums
        » » Getting Array Elements Values with While Loop Show Display
Getting Array Elements Values with While Loop Show Display
Post Description: getting array elements values with while loop show display Snippets
Post Tags:
This Post Has Been Viewed 540 Times Since Sat Feb 23, 2008 5:47 pm Author hostman with 1 replies
Next Post »» how to make table with alternating color change colors each row
Getting Array Elements Values with While Loop Show Display
Advertise On This Page




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

Your Name
Your Email Address (Will Not Be Published)
Notify Me When Someone Replies to this Page
(An email will be sent to you when someone replies to your comments)
Your Comments
Include A Picture with your comments
Share
| More
Share this page by putting this URL in your comments to other websites like myspace, Facebook, Twitter friendster, Hi5, Groups, Boards, Forum or others. Just Copy and Paste this Code
URL:
To embed this topic, just copy the code from the "Embed" box. Once you've copied the code, just paste it into your website or blog to embed it.
Embed:
BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums
BBCODE:
Subscribe Feeds
Webmasters - Exchange Links With Us. Add related websites to this topic
Add Link:
Links Related to : Getting Array Elements Values with While Loop Show Display

Comments and replies About Getting Array Elements Values with While Loop Show Display
:: 1 :: Reply #104550 Reply By Chantha On Thu May 28, 2009 12:43 am
Chantha:
dear sir,

i would like to request to all please write code that retrieve data and image from datbase of a field to be randomly in webpage.

thank you in advance.

kind regard,
chantha