variables in footer

Display global PHP variables in a CF table footer.

Overview

Variables defined in the settings tab are not accessible in the list display footer section.
In the footer section, declare the variable as global before using it to output the value.

Answered
ad admin_wiky 18 Sep, 2014
Hi all,

I use a table display type of listing and I use some global variables in php functions (in settings tab).
In list displays tab are header and footer sections and I need show resulting value of some variables.

How to do it? variables used in settings tab dont give an effect in list display tab.

thx
Max_admin Max_admin 21 Sep, 2014
How did you use the variables in the settings tab ?

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
ad admin_wiky 22 Sep, 2014
Hi Max,

how do u mean it? php code starts

zakladni.saldo: if (!isset($saldo)) {global $saldo;} .........

and works fine on page.
Max_admin Max_admin 22 Sep, 2014
Answer
Ok, I think you can use this in the footer then:

global $saldo;
echo $saldo;


But I'm not 100% sure, please try it and let me know!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
ad admin_wiky 22 Sep, 2014
It is OK. I thought that command global $saldo; rewrite the value, but I was wrong.
thank you
Gr GreyHead 22 Sep, 2014
Hi homeopat,

I think that you need to have the global $variable_name; line **before** you make any use of the variable. Otherwise a local copy is created.

Bob
This topic is locked and no more replies can be posted.