variables
-
Hello:
I think I know the answer to this but I am not sure so I somebody can explain. I want to store a variable on a page; let’s say the varible is “$ZC”. I thought the variable would be remembered at any point on the page; but since I set the variable in the “single.php” file; when I try and access the variable in some code in the “single-content.php” file the value is lost; even though both pieces are running on the same post. the variable is set way at the top of the page before header is set; and then I try and access it in the “post content” area; but it seems to be lost. Is it because I am in a different php file? even though I am in the same post? to carry across a variable from one php file to another like this; are the only ways to this session variables and cookies? Please let me know…
Thanks,
Gerard
- The topic ‘variables’ is closed to new replies.