Forums »
  PHP Forums And Topics Discussions About Hyper Text Programming Language »
    How To Display Array Contents

How To Display Array Contents

Description: How To Display Array Contents
Tags: how ,to ,display ,array ,contents ,
Posted On Mon Feb 11, 2008 By mysql In PHP Forums And Topics Discussions About Hyper Text Programming Language Forums
i want to know how i can display or show the contents or the values of an array into one whole output.

for example if i have an array with 5 different values, how can i display what that array holds?

thanks
Bhargb Sat Jul 31, 2010
Plz reply me of this problem..................
Administrator Sun Feb 24, 2008
take a look at this tutorial. it helped me alot

how-to-index-arrays-and-show-all-the-elements-and-values-of-array

tech Sat Feb 23, 2008
if you want display from mysql query you can us this one:


$sql = "SELECT * FROM ".$db_prefix."config";
$result = mysql_query($sql ,$db);
$myrow = mysql_fetch_array($result);
print_r(array_values($myrow));
hostman Mon Feb 11, 2008
thanks..

you can get more information at

http://www.php.net/manual/en/function.array-values.php
lucas Mon Feb 11, 2008
lets say you have something like this:

<?php
$array = array("size" => "XL", "color" => "gold");
echo '<pre>';
print_r(array_values($array));
echo '</pre>';
?>


you will have something like this come out:
OUTPUT:
Array
(
    [0] => XL
    [1] => gold
)
Information
Title: How To Display Array Contents
Info: This Post Has Been Viewed 0 Times Since
Date: Mon Feb 11, 2008
Author mysql Received 5 Replies #1078
Related Content
Related Pages
Related Sites
Add Your Website
Share
wallpaperama | Wallpapers | Forums | Terms Of Service

copyright © 2013 wallpaperama - All Rights Reserved - Last Updated Tue Jun 18, 2013 (-8 GMT)
Powered by: Webune Forums V5