Jump to content

array


dezkit

Recommended Posts

You can use print_r, implode with echo, or a foreach loop with echo:

Using print_r

<?php
echo '<pre>' . print_r($array,true) . '</pre>';
?>

Using implode:

<?php
echo implode('<br>',$array) . '<br>';
?>

Using foreach:

<?php
foreach ($array as $val)
   echo $val . '<br>';
?>

 

It really depends on what you're looking to do.

 

Ken

Link to comment
https://forums.phpfreaks.com/topic/98509-array/#findComment-504110
Share on other sites

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.