Jump to content

Recommended Posts

Unless the page you are wanting to use the variable is included in the file that the variable was defined in then you do this:

$myvar = 'some value';

include 'some_file.php';

 

<?php

echo $myvar;

?>

 

If its not then either set a cookie or use sessions.

Link to comment
https://forums.phpfreaks.com/topic/104758-vairables-help/#findComment-536261
Share on other sites

Head over to mybboard.net, if you use the software you'll notice that their template system uses these {$something} to call variables and or arrays from php files. Here's a sample from the template system:

 


			{$lang->copyright} © 2002-{$copy_year} <strong><a href="http://www.mybboard.com" target="_blank">MyBB Group</a></strong>
			<!-- End copyright -->
<br>
			{$lang->copyright} © 2006-{$copy_year} 

 

 

Link to comment
https://forums.phpfreaks.com/topic/104758-vairables-help/#findComment-536267
Share on other sites

I am familiar with mybb.

 

myBB uses eval() to parse the variables from the templates stored in the database. The variables are defined from the mybb core system and other places such as the mybb settings file/table. Thier template system is rather complex.

Link to comment
https://forums.phpfreaks.com/topic/104758-vairables-help/#findComment-536273
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.