Jump to content

Vairables help


Imad

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.