Jump to content

Display Array Vertically


Dysan

Recommended Posts

Iterate the array, not using print_r, but using a while or foreach loop.

 

foreach($arrayname as $arrayvalue) {

  echo $arrayvalue."<br />\n";

  }

 

That would work too, and would get rid of the pesky tacky Array() onthe top and bottom.

using your code is a waste of time ..

if you want to view the content of array and how it is formated there is no better way than var dump and print_r

echo '<pre>';
print_r();
echo '</pre>';

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.