CodeIgniter Forums

Full Version: $this->upload->$data, trouble accessing array items
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum


I am having trouble with what is probably a simple problem. I am trying to access the [file_name] and [file_path] items in the array $this->upload->data() that is produced when uploading files.

Can anyone point out how to do it? I have tried using a foreach loop and also using the array helper element() function. But I just can't seem to get it.


El Forum

This is how I did it, but I'm no expert. Also I'm uploading one file at a time.

$aFile = $this->upload->data();
$sPath = $aFile['full_path'];

El Forum

thanks steelaz - perfect, just what I needed. I knew it would be simple, just couldn't get it.

El Forum

Nice answer stellaz! Thanks dude!