• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
$this->upload->$data, trouble accessing array items

#1
[eluser]benmanson[/eluser]
Hi,

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.

thanks
Ben

#2
[eluser]steelaz[/eluser]
This is how I did it, but I'm no expert. Also I'm uploading one file at a time.

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

#3
[eluser]benmanson[/eluser]
thanks steelaz - perfect, just what I needed. I knew it would be simple, just couldn't get it.

#4
[eluser]dark_lord[/eluser]
Nice answer stellaz! Thanks dude!


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.