Hello everyone,
I have made a template for the website I'm working on using PHP HTML_Template_IT pear. It's really neat and useful especially If you are going to add new features to your website.
Anyway, When I created my template, I made several empty places in it and set some variable name to them. When I use this template I just use an expression to set the proper variable as shown below.
Code:
$template->setVariable("second_menu6","Help");
Everything is fine, when I'm assigning a string or a simple integer or any other types of variables.
My big issue is when I call a function from another file which creates a table.
Calling
include 'functions/league_table.inc'; at the beginning of the file simply makes a table on top of my page.
I really don't know why it shows the table since it's an *.inc file.
I also tried to use following method to set the variable, but it just prints 1.
Code:
$s=include 'functions/league_table.inc';
$template->setVariable("second_top_left",$s);
I will appreciate your help.
Thanks for reading.