Jump to content

returning only values of a chunked array


brainstem

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!
Link to comment
https://forums.phpfreaks.com/topic/22532-returning-only-values-of-a-chunked-array/
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.