Php array value check in html upload form
<p>I can check a simple variable if it's empty or not. But how do i check the array value which is come from Html Upload Form. Like: <strong>name=images[];</strong></p>

<p>Simple variable check:</p>

<pre><code>if(empty($somevalue))
  $err[] = "your variable is empty";
</code></pre>

<p>But how do i check if it's something like this:</p>

<pre><code>&lt;input name="images[]" type="file"/&gt;
</code></pre>

<p><strong>Update Code:</strong></p>

<pre><code>&lt;?php
if(isset($_POST['Submit']) &amp;&amp; $_POST['Submit'] == "Save &amp; Continue")
{
$number_of_file_fields = 0;
$number_of_uploaded_files = 0;
$number_of_moved_files = 0;
$uploaded_files = array();
$upload_directory = dirname(__file__) . '/uploaded/'; //set upload directory

$img[] = $_FILES['images']['name']; 
$img = array();
$err = array();

if(isset($img))
{
    if(empty($img)) 
        $err[] = "Your property picture require";           
}

if(!empty($err))
{
    foreach($err as $er)
    {
        echo $er;
    }   
}
else
{
    echo "done";    
}

}

?&gt;
&lt;form action="&lt;?php echo $action; ?&gt;" method="post" enctype="multipart/form-data"   
name="mutiple_file_upload_form" id="mutiple_file_upload_form"&gt;
&lt;table width="1020" border="0" cellspacing="7" cellpadding="0"&gt;   
 &lt;tr&gt;
 &lt;td valign="top" width="250"&gt;
     Upload your property pictures
     &lt;/td&gt;
     &lt;td&gt;
      &lt;div id="file_container"&gt;
        &lt;input name="images[]" type="file" class="tr2"  /&gt;
        &lt;br /&gt;
      &lt;/div&gt;
      &lt;a href="javascript:void(0);" onClick="add_file_field();"&gt;Add another&lt;/a&gt;&lt;br /&gt;
      &lt;input type="submit" value="Save &amp; Continue" name="Submit" class="submit" /&gt;
      &lt;/td&gt;
 &lt;/tr&gt; 
 &lt;/table&gt;
&lt;/form&gt; 
&lt;/table&gt;  
</code></pre>
