How can I display a PHP value in a TPL file?

I am simply trying to create a value using php and then dispaly it in a TPL file.

The TPL file states and ONLY states:

[php]{test}[/php]

The PHP file states and ONLY states:

[php]<?php

$test=‘http://cleaverconstruction.com/images/header2.jpg’;
$monkey->assign(‘test’, $test);
include ‘photochanger.tpl’;

?>[/php]

I now get an error message:

[php]Fatal error: Call to a member function assign() on a non-object in /home1/cleaverc/public_html/photochanger.php on line 5
I just need my website to display “http://cleaverconstruction.com/images/header2.jpg” through the TPL file so I can move this value where i want it to be moved.[/php]

Thank you.

@Max CR

Have you tried using the PHP Smarty template engine? They have very good documentation and it is very easy to setup & use.

More information on the PHP Smarty Template Engine:
http://www.smarty.net/

Sponsor our Newsletter | Privacy Policy | Terms of Service