variables between snippets
-
I tried the simplest test I could.
snippet 1:
<?php
global $PHPPC;
$myvar = ‘Hello Mom’;
$PHPPC::$_vars[“myvaridentifier”] = $myvar;
echo $myvar;
?>snippet 2:
<?php
global $PHPPC;
$myvar = $PHPPC::$_vars[“myvaridentifer”];
echo $myvar;
echo ‘test completed’;
?>snippet 2 echos only the ‘test completed’;
what am I doing wrong?
The topic ‘variables between snippets’ is closed to new replies.