Q:

Unable to get an error from the array with getID3

I'm trying to get an error to return when I search the temporary file that is uploaded.
`
$getID3 = new getID3;
$file = $getID3->analyze($_FILES["file"]["tmp_name"]);
//print_r($file);

if (isset($file['error'])) {
    echo $file['error'];
} else {
    echo "
    <b>Duration:</b> " . $file['playtime_string'] . "<br/>
    <b>Dimensions:</b> " . $file['video']['resolution_x'] . "x" . $file['video']['resolution_y'] . "<br/>
    <b>Filesize:</b> " . $file['filesize'] . "bytes";
}

`
And it exists in the array because when I upload an invalid file type it returns this array.
Array
        (
            [GETID3_VERSION] =&gt; 1.9.12-201602240818
            [filesize] =&gt; 159924
            [filepath] =&gt; /tmp
            [filename] =&gt; phpQAJeuD
            [filenamepath] =&gt; /tmp/phpQAJeuD
            [encoding] =&gt; UTF-8
            [error] =&gt; Array
                (
                    [0] =&gt; unable to determine file format
                )

        )

How is it not getting ['error']?

A:

['error'] is an array.
You need to output ['error'][0]

