|
Posted by rich on 09/10/06 03:46
IchBin wrote:
> rich wrote:
> > This is the actual code.
> >
> > <?php
> > $getnormwtA = getnormwt();
> > $numct = count($getnormwtA);
> > $tab = 16;
> > $wt = 'weight';
> > $typ = 'radio';
> > for ($i=0; $i<$numct; $i++){
> > echo "<input name=". $wt ." tabindex=". $tab ." value=".
> > $getnormwtA[$i]['bodywtid'] ." type=". $typ ."/>".
> > getnormwtA[$i]['bodyweightnorm'] .">";
> > $tab++;
> > }
> > ?>
> >
> > rich wrote:
> >> I am trying to setup a set of radio buttons from a table. I am getting
> >> the error:
> >> Parse error: parse error, unexpected '[', expecting ',' or ';' in
> >> /var/www/html/liberty/prototype1.php on line 251
> >> This is the snippet of code.
> >>
> >
> >> <?php
> >> $getnormwtA = getnormwt();
> >> $numct = count($getnormwtA);
> >> $tab = 16;
> >> $wt = 'weight';
> >> $typ = 'radio';
> >> for ($i=0; $i<$numct; $i++){
> >> echo "<input name=". $wt ." tabindex=". $tab ." value=".
> >> $getnormwtA[$i]['bodywtid'] ." type=". $typ ."/>".
> >> getnormwtA[$i]['bodyweightnorm'] .">";
> >> $tab++;
> >> ?>
> > }
> >> ?>
> >>
> >> This is line 251
> >>
> >> echo "<input name=". $wt ." tabindex=". $tab ." value=".
> >> $getnormwtA[$i]['bodywtid'] ." type=". $typ ."/>".
> >> getnormwtA[$i]['bodyweightnorm'] .">";
> >>
> >> Any suggestions?
> >
>
> What array structure is getnormwt() returning into $getnormwtA. What
> does function getnormwt() look like.
>
function getnormwt() {
$getwtnormQ = "SELECT * FROM li_bodyweightnorm";
$getwtnormR = pg_query($getwtnormQ);
$getwtnormA = pg_fetch_all(getwtnormR);
return($getwtnormA);
}
> --
> Thanks in Advance...
> IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
> 'If there is one, Knowledge is the "Fountain of Youth"'
> -William E. Taylor, Regular Guy (1952-)
Navigation:
[Reply to this message]
|