zasnemo
-
Posts
6 -
Joined
-
Last visited
Never
Posts posted by zasnemo
-
-
but guys... to make it simpler, this doesnt even work:
[code]
<?php
function template_main_above()
{
$aaa = 'aaa';
echo $aaa; // comes out fine
include('aaaa.php');
}
?>
<?php //aaaa.php
echo $aaa; // doesnt come out fine
?>
[/code]
:'( :'( -
mmm, wheres the include? I dont want to echo...
<?php
function template_main_above()
{
global $context;
print_r($context); // $context comes out fine.
include('aaaa.php');
}
?>
<?php //aaaa.php
global $context;
print_r($context); // $context DOESNT come out fine.
?> -
I doubled checked and added:
$fruit = 'aaaaaaa';
in
function template_main_above() function
then in my include('a.php');
I echo $fruit; but no answer :-S -
oh shite, i must of done the example wrong then.
im trying to edit SMF, which contains a:
function template_main_above()
{
global $context;
print_r($context);
$context comes out fine.
and in that function i include:
include('a.php');
in that a.php I try to
print_r($context);
but it doesnt come out :-S -
how can i pass variables from an function to a include inside it?
<?php
// index.php
function a() {
$a= 'apples';
include('fuit.php');
}
?>
<?php
// fruit.php
echo $a;
?>
THANKS!!
PLEASE help!!!
in PHP Coding Help
Posted