I came across an excellent tutorial here http://coursesweb.net/php-mysql/display-data-array-mysql-html-table_t on how to output mysql into a table.
I searched for the article because I wanted to go from 1 column, to 3 columns. Everything works great, except for when I want to include a file in concatenation. I'm trying to do the following:
$html_table .= '<td>';
$html_table .= '' . include('data.php') . '';
$html_table .= '</td>';
However this doesn't work. For example if the data.php file contains some simple text such as test, I get the following on the screen:
test test test test test test test test test
1 1 1
1 1 1
1 1 1
The very strange thing is if I do a little test and instead type:
$html_table .= '<td>test</td>';
this works absolutely fine and the following is outputted:
test test test
test test test
test test test
I've looked for information about using include() within this context and I've found nothing. The reason I need to include a file is because the data I'm trying to output contain lots of text. Can anyone advise?
falseon error and1on success.$html_table .= include('data.php');and<?php return 'test';in data.php.ob_startand al.