Interpolated variables
Posted: 24 July 2005 08:15 PM   [ Ignore ]  
Lab Assistant
Avatar
RankRank
Total Posts:  172
Joined  07-22-2005

Is there an easy way to pull up a list of all interpolated variables in PHP or for EE? This would be useful instead of guessing.

 Signature 

{sig name=“Jeff /“The Mage/” Barsky ” /}

Profile
 
 
Posted: 24 July 2005 11:22 PM   [ Ignore ]   [ # 1 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9853
Joined  06-19-2002

“Interpolated PHP variables”??  I’m afraid I have no idea what you’re asking for here.  I think you might be using the term “interpolated” incorrectly here…

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
Posted: 25 July 2005 12:11 AM   [ Ignore ]   [ # 2 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  172
Joined  07-22-2005

In PERL, the term used when a variable is replaced is interpolation. So in PERL code:

var $username = “Jeff”;
print qq|My name is $username.|;

would be seen as:

“My name is Jeff”

Simple interpolation. In PHP the same would be like:

My name is {username}.

In perl I would write and script to view the variable name hash, but I have no clue how to retrieve it from PHP. Does PHP even support hash structures, I do not think so.

Forgive the seemingly simple question, I do not have a PHP manual in from of me and a search did not answer questions.

What I want is a list of all the {variables} can can be used in page creation. $ENV, $INC, etc….

Thanks, I still got to wrap the brain round a feature poor language… better to do it all in C.

 Signature 

{sig name=“Jeff /“The Mage/” Barsky ” /}

Profile
 
 
Posted: 25 July 2005 02:22 AM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  33276
Joined  05-14-2004

You can find the variables in the User Guide categorized by which module they are available in (and, of course, global variables).  Is that what you’re after?

 Signature 
Profile
MSG
 
 
Posted: 25 July 2005 09:20 AM   [ Ignore ]   [ # 4 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9853
Joined  06-19-2002

Simple interpolation. In PHP the same would be like:

My name is {username}.

That is an EE variable; it has nothing to do with PHP.  In fact, variables in PHP look exactly like they do in Perl: the dollar sign followed by the variable name.

As Lisa said, the User Guide lists the various EE Tags (and their parameters and variables), global variables, etc. that are available.

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 66463 Total Logged-in Users: 61
Total Topics: 84852 Total Anonymous Users: 10
Total Replies: 455301 Total Guests: 182
Total Posts: 540153    
Members ( View Memberlist )
Newest Members:  drivenewmediaTgunRooks TowermarkfavazzastephenhfoxysaxAtosheviboyjbcobbsOut_There