Jump to content

Archived

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

brainstem

returning only values of a chunked array

Recommended Posts

I can't quite figure this one out, need some help widdit.

pulling all content from a file via file_get_content('massive.txt');
and chunking it all into 2 word arrays
problem is when I go to foreach ($arr as $value) echo $value
it just spits out a rediculous amout of 'Array' echos.
tried a for loop as well with no luck.

how can I take a huge chunked array and strip out thier contents, but in the proper sequence.
i.e.
Massive Array (roughly 1700 internal unassigned (per chunk) arrays with 2 words each)

main arr
    arr 0-apple 1-apple2
    arr 0-orange 1-orange2
    arr 0-pear 1-pear2

echo as

Apple Apple2
Orange Orange2
Pear Pear2

Thanks in advance!

Share this post


Link to post
Share on other sites
try [code]foreach ($arr as $value) echo implode(' ',$value);[/code]

Share this post


Link to post
Share on other sites

×

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.