Forum Moderators: coopster
$sHTML = $sHTML."<td style='".$this->gcColumnDetail[$j]->sColumnStyle
.$this->regRowStyle."'><select name =combo$cntrl_count_comb"
.$this->gcColumnDetail[$j]->sShowValue."\" value='"
.$rsRow[$this->gcColumnDetail[$j]->iColumnPosition].
"'>
for ($y=0; $y<$num_rows; eval($y=$y+1) )
{
<option >$combval[$y]</option>
eval($y= $y +1)
}
</select>
</td>";
************************************************
$sHTML = $sHTML."<td style='".$this->gcColumnDetail[$j]->sColumnStyle
.$this->regRowStyle."'><select name =combo$cntrl_count_comb"
.$this->gcColumnDetail[$j]->sShowValue."\" value='"
.$rsRow[$this->gcColumnDetail[$j]->iColumnPosition].
"'>
'for ($y=0; $y < $num_rows; $y++ )
{'
<option > $combval[$y] </option>
'}'
</select>
</td>";
PLEASE HELP!
$sHTML .= "<td style=\"".$this->gcColumnDetail[$j]->sColumnStyle
.$this->regRowStyle."\"><select name=\"combo$cntrl_count_comb"
.$this->gcColumnDetail[$j]->sShowValue."\" value=\""
.$rsRow[$this->gcColumnDetail[$j]->iColumnPosition].
"\">";
for ($y = 0; $y < $num_rows; $y++)
{
$sHTML .= "<option>".$combval[$y]."</option>";
}
$sHTML .= "</select>
</td>";
This will work. for is a loop, and shouldn't be put inside the string declaration.
Michal Cibor
PS. Welcome to webmasterworld
PS. You can also use this format:
$sHTML .= "<td style=\"{$this->gcColumnDetail[$j]->sColumnStyle}
{$this->regRowStyle}\"><select name=\"combo$cntrl_count_comb
{$this->gcColumnDetail[$j]->sShowValue}\" value=\"
{$rsRow[$this->gcColumnDetail[$j]->iColumnPosition]}
\">";