Array acting screwey?

I have a simple form,



<form method="POST" action="#">
<fieldset>
<legend>All images inside 1 directory</legend>
<input type='checkbox' value='1383680050-(at).svg.png' name='image_to_move[]' />
<img src=images/1/1383680050-(at).svg.png style='height:70px' />
<input type='checkbox' value='1383680050-252.png' name='image_to_move[]' />
<img src=images/1/1383680050-252.png style='height:70px' />
<input type='checkbox' value='1383680050-258.JPG' name='image_to_move[]' />
<img src=images/1/1383680050-258.JPG style='height:70px' />
<input type='checkbox' value='1383680050-avatar.jpg' name='image_to_move[]' />
<img src=images/1/1383680050-avatar.jpg style='height:70px' />
</fieldset>
<input type="submit" value="Move Images" />
</form>

But When I submit and check the _POST and the image_to_move
using


echo "<pre>"; print_r($_POST); echo "</pre>";
echo "<hr>";
echo "<pre>"; print_r($image_to_move); echo "</pre>";


All I get is
<pre>Array
(
[image_to_move] => Array
(
[0] => 1383680050-252.png
)

)
</pre><hr><pre></pre>

why is the 2nd array shown as not there?

Because it’s $_POST['image_to_move'], not $image_to_move.

Off Topic:

There used to be a time where $image_to_move would have been automatically created for you by PHP if you had so called superglobals enabled in php.ini. Since it was as big a security risk as leaving your front door open in the middle of a busy street when you went away for a few hours that option is no longer available in PHP

thanks