Jump to content

can some one help me with this array??


c_shelswell

Recommended Posts

Hi i've got an array from a class in uber uploader and i'm struggling to extract the data from it i need. Here's a print output from the screen:

 

Array ( [0] => fileinfo Object ( [slot] => upfile_0 [name] => BACK2.jpg [size] => 48853 [type] => image/pjpeg ) [1] => fileinfo Object ( [slot] => upfile_3 [name] => videodivxtest_13.zip [size] => 252573 [type] => application/x-zip-compressed ) [2] => fileinfo Object ( [slot] => upfile_1 [name] => musictest_13.zip [size] => 252573 [type] => application/x-zip-compressed ) [3] => fileinfo Object ( [slot] => upfile_2 [name] => videompegtest_12.zip [size] => 252573 [type] => application/x-zip-compressed ) ) 

 

I know that the slot label will always be the same i.e. upfile_1, upfile_2 etc  what i'm needing to extract is the file name at slot upfile_1. I was expecing something along the lines of:

 

$fileThree = $_FILE_DATA['upfile_3']->getFileInfo('name');

 

if that makes sense??

If anyone could help that'd be great.

Cheers

Link to comment
https://forums.phpfreaks.com/topic/97789-can-some-one-help-me-with-this-array/
Share on other sites

You see that's the problem i had initally expexted that the array would stay in order but it doesn't seem to. i.e $_FILE_DATA[1] would always hold upfile_1. Instead it seems to hold upfile_3 so i was hoping to ask: "give me the file name in upfile_3"

 

Is that possible?

Cheers

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.