Posted by mantrid on 09/23/06 14:34
"mantrid" <ian.dandav@virgin.net> wrote in message
news:SrbRg.40250$WV2.18238@newsfe2-gui.ntli.net...
> HelloIn the following snippet of code x text fields are generated. I can
> include <br> at the end to split them onto separate lines, but how do I
> modify the code to have two text fields on each line?
>
> for ($x = 1; $x <= $ansperquest; $x++){
> echo "Type Answer ".$x ?><input name="<?php echo 'ansE'.$x; ?>"
size="30"
> type="text"><?php
> }
>
> Thanks
> Ian
>
>
ok
i got it
for ($x = 1; $x <= $ansperquest; $x++){
if ($x % 2 == 0 ){
echo "Type Answer ".$x ?><input name="<?php echo 'ansE'.$x; ?>"
size="30" type="text"><br><?php
}else{
echo "Type Answer ".$x ?><input name="<?php echo 'ansE'.$x; ?>"
size="30" type="text"><?php
}
}
Navigation:
[Reply to this message]
|