Welcome Guest, Not a member yet? Register   Sign In
accessing an element in an array of arrays
#1

(This post was last modified: 04-03-2021, 06:40 AM by richb201.)

PHP Code:
$files_to_upload = Array
(
        [sd1e6fec1] => Array
        (
                [name] => 86.jpg
                
[type] => image/jpeg
                
[tmp_name] => C:\wamp\tmp\phpFC42.tmp
                
[error] => 0
                
[size]  => 258177
        
)






I am trying to access the size element using this:
$size=$files_to_upload[$name].size;

when I run this I get $size="Arraysize". I am just trying ti get the size element.  How can get that 258177 number?

$name is a string that I got from another structure.
proof that an old dog can learn new tricks
Reply


Messages In This Thread
accessing an element in an array of arrays - by richb201 - 04-03-2021, 06:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB