php file_exists does not work for array
<p>I posted this question earlier but I have now used the feedback and simplified the php program to show how it still fails.
using the file_exists with an array always fails:
Here is a simple program I wrote that shows the failure:</p>

<pre><code>[root@dsmpp1 steve]# ls -l data
 total 4 -rw-r--r-- 1 root root 0 Sep 19 11:41 test_file 
[root@dsmpp1 steve]# cat test_file.php
`#!/usr/bin/php -q 
    &lt;?php 
    $i=1; 
    $testarray=array(); 
    $testarray[$i]="test_file"; 
    echo "testarray $testarray[$i]\n";
     **if(file_exists("/home/steve/data/testarray[$i]")) {**
    echo "file exists\n"; } 
    else { echo "file does not exist\n"; } `    
[root@dsmpp1 steve]# php -q test_file.php 
testarray test_file 
file does not exist 
[root@dsmpp1 steve]#
</code></pre>

<p>I used the double quotes around the directory and file name as suggested earlier
and it is still not working.</p>
