12-21-2007, 09:07 PM
|
#5 (permalink)
|
|
The Prestige
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
|
Quote:
Originally Posted by sjaq
No, it won't.
It gets all the data out of the array so if you would like to replace {page} with the contents of $page you'll have to do something like this:
PHP Code:
<?php
$values = array( 'page' => $page );
$tpl->parse('test', $values);
?>
|
Thanks! THat worked :D
Oh this is awesome ;)
Thanks a bunch!
Edit:
Can you explain this line?
PHP Code:
$replaced = preg_replace_callback('/\{([a-z0-9\.]+)\}/i', array($this, 'replace_callback'), $contents);
???
|
|
|
|