[eluser]moonshine[/eluser]
i found my problem
(it's obvious i haven't been sleeping much... i was clobbering the test? derrr.
any how i don't like my solution but it works, any pointers on how to make this DRYer or about how to move some of this code to the controller or model?
Code:
if(!empty($user_session_file_data))
{
foreach ($user_session_file_data as $stored_clue_num => $subArray)
{echo '<BR><BR>uped cn:'.$stored_clue_num.'<BR>';
foreach ($subArray as $stored_image_num=>$value)
{echo ' uped in:'.$stored_image_num.'<BR>';
if($stored_clue_num==$clue_num && $stored_image_num==$image_num){
$image_uploaded = TRUE;?>
<input type="text" style="margin-bottom:10px; margin-left:0px; width:200px;" value="<?= ($image_uploaded) ? $user_session_file_data[$clue_num][$image_num]['caption'] : ''?>" name="<?=$caption_field?>"/>
<?
}
else{$image_uploaded = FALSE;?>
<input type="text" style="margin-bottom:10px; margin-left:0px; width:200px;" value="<?= ($image_uploaded) ? $user_session_file_data[$clue_num][$image_num]['caption'] : ''?>" name="<?=$caption_field?>"/>
<?}
}
}
}
else{$image_uploaded = FALSE;?>
<input type="text" style="margin-bottom:10px; margin-left:0px; width:200px;" value="<?= ($image_uploaded) ? $user_session_file_data[$clue_num][$image_num]['caption'] : ''?>" name="<?=$caption_field?>"/>
<?}?>
<br class="cleardouble"/>
</div>
<?
if(!empty($user_session_file_data))
{
foreach ($user_session_file_data as $stored_clue_num => $subArray)
{echo '<BR><BR>uped cn:'.$stored_clue_num.'<BR>';
foreach ($subArray as $stored_image_num=>$value)
{echo ' uped in:'.$stored_image_num.'<BR>';
if($stored_clue_num==$clue_num && $stored_image_num==$image_num){
$image_uploaded = TRUE;
?>
<div style="float: left; border: 1px solid #cccccc; margin-left: 20px;">
<? print_r($user_session_file_data)?>
<img src="/photos/tmp/<?=$this->Photos_model->photo_name($user_session_file_data[$clue_num][$image_num]['filename'], 'thumb')?>" width="150" />
</div>
<?
}
}
}
}