OK, small question, I hope.
I have to output about 120 odd variables from a database. They are arranged in 3 coloumns. What I wish to do is this. Make a simple function that will take a single variable and output the variable name and then value. A conceptual example would be;
output(test);
function output($var) {
$var_name = ucfirst($var);
// here is where it gets tricky
// how do I convert the string "test"
// into a variable named $test?
--Database Stuff to grab the value--
--Output stuff blah blah--
?>
IF this can be done, then a little help would be greatly appreciated :)
I have to output about 120 odd variables from a database. They are arranged in 3 coloumns. What I wish to do is this. Make a simple function that will take a single variable and output the variable name and then value. A conceptual example would be;
output(test);
function output($var) {
$var_name = ucfirst($var);
// here is where it gets tricky
// how do I convert the string "test"
// into a variable named $test?
--Database Stuff to grab the value--
--Output stuff blah blah--
?>
IF this can be done, then a little help would be greatly appreciated :)
