Pushing field names into array (for @wiseacre)
<div id="images"> <? $count = count(glob($images_dir."*.png")); for ($i=0;$i<$count;$i++) { $num = $i + 1; if(!is_file($_SERVER['DOCUMENT_ROOT'].ROOT_SERVER."files/".$get['id']."/thumbs/".$get['pdf']."-".$i.".png")) { /* if thumbs don't exist, create thumbnails */ create_thumbnail($get['pdf']."-".$i.".png", $images_dir, $thumbs_dir, "171"); } ?> <div id="thumb"> <input type="hidden" name="files[<?php echo $i ?>][id]" value="<?=$get['id']?>" /> <input type="hidden" name="files[<?php echo $i ?>][file_name]" value="<?=$get['pdf']?>-<?=$i?>.png" /> <div id="image"><img src="<?=ROOT_SERVER?>files/<?=$get['id']?>/thumbs/<?=$get['pdf']?>-<?=$i?>.png" width="222" alt="" border="0" /></div> <div id="link"><input type="text" name="files[<?php echo $i ?>][links][]" id="link" class="input" /></div> <div id="link"><input type="text" name="files[<?php echo $i ?>][links][]" id="link" class="input" /></div> <div id="link"><input type="text" name="files[<?php echo $i ?>][links][]" id="link" class="input" /></div> </div> <? } // loop through all pages/images ?> </div>
last updated january 2011