Dear All,
Says, we want to create pdf use TCPDF. But, the data that we want to create is coming from database table.
We can set like Author Name setting, Paper Size, Margin, etc, and results to normal.
But when we want to echo the data from database, the result is the variabel do not want to convert to its value. We can get the pdf created here with the data from database, but the variable keep stick to its variable name, such as $FirstName, $LastName.
The original idea is, we want data must coming from database, because we can easily edit via browser. But the problem is the variables from database do not want to convert its value.
- How can we get true pdf result, where variables can convert its values? Right now I can not get its values, just its variables names.
Example of present values in database:
Halo, my name is $model->FirstName. I am $model->Age years old. My social number is $model->SocialNumber.
In TCPDF, results just like above, the variable not change at all. It is should:
Halo, my name is James. I am 45 years old. My social number is 123456789.
Thank you for your help.