PDA

View Full Version : Store function into Variable


darkblade25
05-19-2008, 05:06 PM
I have been messing around with putting a php file into vbulletin. The only way I get that is by storing the output into a variable and call that variable in a template. Now I have a script that cycles through a mysql table and echoes all the info there, and I cant store each on into a variable. I also tired something like $test = test(); but it just executes the script

Is there a way to assign the output of the function to a variable without the function displaying the output?

*Sorry, just figured it out, you use ob_start(); and then store the ob_get_contents() to a variable.