The threads probably getting old ... but just in case anyone else is following this, Larry&#39;s example is almost perfect. Simply modify<br><br>function phptemplate_foo_or_something() {<br><br>to<br><br>function phptemplate_foo_or_something($data) {
<br><br>Then everything will work. Thanks for the help David and Larry.<br><br><div><span class="gmail_quote">On 4/10/07, <b class="gmail_sendername">Larry Garfield</b> &lt;<a href="mailto:larry@garfieldtech.com">larry@garfieldtech.com
</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>#################################################<br>module code - 
mymod.php<br>#################################################<br><br>function mymod_foo() {<br>&nbsp;&nbsp;$data = array(&#39;foo&#39; =&gt; &#39;bar&#39;);<br>&nbsp;&nbsp;return theme(&#39;foo_or_something&#39;, $data);<br>}<br><br>function theme_foo_or_someting($data) {
<br>&nbsp;&nbsp;return &quot;something you do with $data that generates a string&quot;;<br>}<br><br>#################################################<br>template.php code<br>#################################################<br><br>
function phptemplate_foo_or_something() {<br>&nbsp;&nbsp;return _phptemplate_callback(&#39;foo_or_something&#39;, $data);<br>}<br><br><br>#################################################<br>foo_or_something.tpl.php<br>#################################################
<br><br>&lt;h1&gt;I want to output value of $foo here&lt;/h1&gt;<br><br>(In this case $foo will have a value of &#39;bar&#39;).<br><br>Cheers.<br><br>--Larry Garfield<br><br></blockquote></div>