Here is my array and i get only name from that array so how can i get it
[
{
"name":"imgpsh_fullsize_anim_31.png",
"type":"image/png",
"tmp_name":"/tmp/phpcaGk0O",
"error":"0",
"size":"34171",
"file":"imgpsh_fullsize_anim_31.png",
"cookie":
{
"name":"admin",
"value":"s3jbpiubqq13tsrase0d4e6cma",
"lifetime":"900000",
"path":"/nback",
},
"previewType":"image"
}
]
2
Answers
I assume this is a JSON string you have in your hands so basically:
If you call your array
$myArray
you would extract only the variable name like so:And if it’s JSON: