Thread: arrays......
View Single Post
Old 04-10-2009, 11:50 AM   #1 (permalink)
allworknoplay
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
allworknoplay is on a distinguished road
Default arrays......

Is there an easy way to print the items of an array without using print_r or var_dump and without using any loops?
I don't want to show key to value relationship like var_dump and print_r shows.... just the items in the array. And no loops...

For example:

$array = array(1,2,3,4,5);

Let's say there's a function called: print_array

Then I would do this:

print_array($array);

And it would spit out: 1 2 3 4 5

I checked out PHP.net but didn't see anything under the print_r function...maybe one of you guys know of some other function?
allworknoplay is offline  
Reply With Quote