02-17-2008, 05:58 AM
|
#2 (permalink)
|
|
The Contributor
Join Date: Jan 2008
Location: Brazil
Posts: 77
Thanks: 14
|
Try this:
PHP Code:
$block .= $row[$columnname];
$columnname is a variable, so I guess you can use it directly inside the $row[] array. If it doesn't work you can also try $row["columnname"] (double quotes instead of single quotes). As far as I remember variables enclosed in double quotes will evaluate to their value... while single quotes won't.
Eg:
PHP Code:
$x = "test";
echo "this is a $x";
//output: this is a test
echo 'this is a $x';
//output: this is a $x
|
|
|