NogDog;10978762 wrote:At the risk of sounding like a smart-@$$, it depends on how you are accessing/using/running that other file.
If it is a separate script that gets launched separately (e.g. by a separate browser URL), then it will be ignorant of any variables used in another script. (Maybe a session variable could be used, but that depends on what you really need to do.) If it is a file that is being included/required by the first file, then the variable will be available to the included file as long as the variable would be in the global scope to begin with.
here - maybe it be easier to show this:
for($j = 0; $j < $count; $j++) {
$cat = $cat_array[$j];
echo "<h3>" . $cat . "</h3>";
echo "<ul class=\"pods\">";
createNewsSection($cat_array[$j]);
echo "</ul>";
the createNewsSection contains the variable i want to access to in this above file...
sorry, I am little confused myself to explain properly i guess. Does this help?
thx again