** Here is the code,and how to retrieve mysql data, pass through the function and print it. i try this but show an error in function part like GenerateName(), GeneratePrice(), GenerateCode() section. How to solve that, Help me to solve that problem **
<?php
require('mc_table.php');
$pdf=new PDF_MC_Table();
$pdf->AddPage();
$pdf->SetFont('Arial','',14);
$pdf->Cell(188,12,'Title',1,1,'C');
$pdf->Cell(47,12,'',0,1);
$pdf->SetWidths(array(47,47,47));
$pdf->Cell(47,12,'Name',1,0);
$pdf->Cell(47,12,'Price',1,0);
$pdf->Cell(47,12,'Code',1,1);
include('db.php');
$sql="Select Name,Price,Code from products";
$result=mysql_query($sql);
while($dtset=mysql_fetch_array($result))
{
$name=$dtset['Name'];
$price=$dtset['Price'];
$code=$dtset['Code'];
function GenerateName($name)
{
$nb=1;
$w='';
for($i=1;$i<=$nb;$i++)
$w.='$name';
return $w;
}
function GeneratePrice($price)
{
$nb=1;
$p='';
for($i=1;$i<=$nb;$i++)
$p.='$price';
return $p;
}
function GenerateCode($code)
{
$nb=1;
$c='';
for($i=1;$i<=$nb;$i++)
$c.='$code';
return $c;
}
for($i=0;$i<1;$i++)
$pdf->Row(array(GenerateName(),GeneratePrice(),GenerateCode()));
}
$pdf->Output();
?>