![]() |
|
#1
|
|||
|
|||
|
Hi All,
I have created a new page of the type PHP File. I want to be able to pass variables in the PHP file up into bits of templates (assigned to variables). I've been playing with eval() but I can't seem to get anything to print out... Do I need to add the variables to the global scope somehow? I was looking at the modules/navigation.php file as an example but couldn't seem to replicate its successes. Any help appreciated ;-) |
|
#2
|
|||
|
|||
|
Ok, so I think I have a few answers but still not getting output...
In the included PHP file I have the following test code: <?php $subject = 'Hello World!'; eval('$deals = "' . fetch_template('dealbits') . '";'); eval('$home["$mods[modid]"][\'content\'] = "' . fetch_template('adv_portal_deals') . '";'); //die(print_r($home)); ?> The dealsbits template just has '$subject' in it and adv_portal_deals has '$deals'. When I refresh the page nothing appears. If I uncomment the die() line the right content is present. Any ideas? |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Passing variables? | cookie | "How Do I..." Questions | 3 | 09-22-2005 11:51 AM |
| Passing variables | gabned | Troubleshooting & Problems | 6 | 09-05-2005 06:12 PM |
| Passing $_GET variables 1.x style doesn't seem to work in 2.x | CareCureJeff | "How Do I..." Questions | 9 | 06-22-2005 10:39 AM |
| Error Passing a Variable | juanschwartz | Troubleshooting / "How do I..." Questions | 8 | 05-25-2005 01:33 PM |
| Passing construct_page_nav variables to module | Fargo | Troubleshooting / "How do I..." Questions | 1 | 11-13-2004 07:55 AM |