function uploadify()
{
$file = $this->input->post('filearray');
$data['json'] = json_decode($file);
print_r($data);
$name = $this->$json->{'file_name'};
echo $name;
$this->files->add($name);
$this->load->view('uploadify',$data);
}
Array ( [json] => stdClass Object (
[file_name] => footer-icpn246.jpg
[real_name] => footer-icpn2.jpg
[file_ext] => .jpg [file_size] => 1.75
[file_path] =>
/home/codeig/public_html/files/footer-icpn246.jpg
[file_temp] =>
/home/codeig/tmp/php8gFyPG ) )
Above is the output from print_r($data);
How would i then pull the key off file name out off this array??? I have tried.
$name = $this->$json->{'file_name'};
$name = $this->json->[file_name];
and many more combinations any help please.
echo $name;
I think you should do in this way
this link may help you http://codeigniter.com/forums/viewthread/109751/P90/