MyBB Community Forums

Full Version: Please explain eval
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I know people would say Google this but i wanted a MyBB specific explanation

eval("\$onlinemembers .= \"".$templates->get("index_whosonline_memberbit", 1, 0)."\";");

eval("\$postbit = \"".$templates->get("postbit")."\";");

how do i properly use the eval function...i have been using it for quite sometime without properly understanding it

eg

Quote:eval("\$onlinemembers .= \"".$templates->get("index_whosonline_memberbit", 1, 0)."\";");

whats that bit in bold..please explain... someone
	/**
	 * Gets templates.
	 *
	 * @param string The title of the template to get.
	 * @param boolean True if template contents must be escaped, false if not.
	 * @param boolean True to output HTML comments, false to not output.
	 * @return string The template HTML.
	 */

function get($title, $eslashes=1, $htmlcomments=1)

In most cases, you don't need to specify those parts.
doh ..kicks himself...thanks yumi