if possible please give/show me different ways.

How It Works

Get an answer in three easy steps. Here's how it works...

Ask Your Question

1. Ask Your Question

Enter your PHP question at the top of this page and click Get An Answer.

Pick Your Priority

2. Pick Your Priority

Tell us how quickly you want your PHP question answered.

Get An Answer

3. Get An Answer

Connect with your programmer via online chat or telephone call.

Answer

Customer

if possible please give/show me different ways.

Posted
Albert Shohez
Programmer

if you want to debug your data and want to its value for development purposes than use:

print_r($your_array);

OR

var_dump($your_data);

and if you want to show it to any user than loop and your logic,
Here you can use, while,for or foreach loop.

here is a example with for loop:

<?php

/* 2 dimensional array in PHP - strictly an
array of arrays ... setup: */

for ($k=1;$k<=10;$k++) {
for ($j=1;$j<=10;$j++) {
        $multable[$k][$j] = $j/$k;
}}

# ---------------------------------------------
?>
<html>
<head>
<title>An array of arrays in PHP</title>
</head>
<body bgcolor=white>
<h2>Two dimensional array</h2><br>
<table border=2 cellpadding=2 cellspacing=2>

<?php

/* Very easy to produce a table from a 2D array! */
for ($k=1;$k<=10;$k++) {
        print "<tr>";
        for ($j=1;$j<=10;$j++) {
                echo "<td>",$multable[$j][$k],"</td>";
                }
        print "</tr>";
}
?>
</table>
</body>
</html>
Posted
Customer

thanks for clarification and nice answer.

Posted

quoteTestimonialsquote

About ExpertHelp

ExpertHelp is changing the way you connect with service professionals.

Whether you have a quick question while preparing your taxes, troubleshooting a computer problem, or need to hire an attorney, ExpertHelp is the most convenient and affordable way to connect with the right service professional to get the job done.

ExpertHelp has been in business since 2011, is an A+ Rated Better Business Bureau accredited member, and offers a 100% satisfaction guarantee on every question you ask!

More PHP Questions...

Ask Your PHP Question & Get An Answer Now!