PHP: Using a variable that are inside a function.
Posted
by
Karem
on Stack Overflow
See other posts from Stack Overflow
or by Karem
Published on 2011-01-13T19:43:15Z
Indexed on
2011/01/13
19:53 UTC
Read the original article
Hit count: 108
php
I have:
include ('functions.php');
check_blocked();
echo $blocked;
in functions.php, check_blocked(); exists. Inside check_blocked I got:
global $blocked;
$blocked = '1234';
I want to echo $blocked variable, that are inside check_blocked().
It doesnt work, no output..
This is an example of my original problem, so please dont say that I could just have the echo inside the function, as I cannot have in my original code.
© Stack Overflow or respective owner