I want to create a variable containing the following stringvalue:
%s %s ...
And another containing:
,$row[\"ProjectNumber\"],$row[\"ProjectName\"] ...
I have the following code:
$headers=\'\';
$rows=\'\';
$s=\'\';
if($Number==\'true\')
{
$sub1.=\", Project.ProjectNumber\";
$headers.=\"<TH>Project Number</TH>\";
$s.=\"<TD>%s</TD>\";
$rows.=\',$row[\"ProjectNumber\"]\';
}
if($Name==\'true\')
{
$sub1.=\", Project.ProjectName\";
$headers.=\'<TH>Project Name</TH>\';
$s.=\"<TD>%s</TD>\";
$rows.=\',$row[\"ProjectName\"]\';
}
eval (\"\$r = \\"$rows\\";\");
do
{
$row=$mydb->fetcharray();
printf(\"<TR ALIGN=\'center\' VALIGN=\'middle\'>\'$s\' $rows</TR></TABLE>\");
$i++;
}
while($i<$no);
No value is added to $s and $rows is not read bu eval as a string,
What shall I do?
Where in the manual can I find help if there is any? I can\'t find help by searching...