Defined variable not working (1 viewing) (1) Guest
Favoured: 0
|
|
|
TOPIC: Defined variable not working
|
|
|
|
Defined variable not working 9 Months, 1 Week ago
|
Karma: 0
|
|
Hi,
Using Joomla 2.5.6
I have a variable defined in /templates/beez_20/index.php.
If I add <?php echo $options; ?> in the index.php file there it works.
If I added <?php echo $options; ?> to the article, it does not output anything.
I tried <?php echo 'Test'; ?> in the article and it outputs Test on the article page, so DirectPHP is working.
Why isn't it seeing the variable.
Thanks
|
|
|
|
|
|
|
The administrator has disabled public write access.
|
kksou (Admin)
Admin
Posts: 1676
|
|
Re:Defined variable not working 9 Months ago
|
Karma: 27
|
|
Hi,
That's because in your article, it doesn't know what $option is.
You can try the following:
<?php
$option = $_GET['option'];
$echo $option;
?>
and see if it works.
Regards,
/kksou
|
|
|
|
|
|
|
The administrator has disabled public write access.
|
|
|