I'm a newbie to php, and I'm in the process of hacking through some moodle code for a prototype.
Anyhows I have some data Id like passed from file1.php to file2.php, for which Im using global variables. The values are intialized in file2 and I need them for use in file1. Here's how I go about it
file1.php
<?php// top of file 1
global $content; // discussion content // line 3
file2.php
global $content;// line 3379
$content=$post->subject;
Back in file1.php
echo 'global scope'.$content; // this is always empty// line 168
Am I missing something here? Attached files file1.php and file2.php