game2002 Posted June 23, 2007 Share Posted June 23, 2007 Please help this newbie I have 3 files. 1 - declare_it.php //it contains an array like this: $bbSaved = array("Blue"=>100, "Red"=>0, "Green"=>50, "Yellow"=>2); 2 - gold_digger.php include("declare_it.php"); print "I have $bbSaved[blue] items<br>"; //this prints 100 after setting the value to 11 in reset_quantity.php, I print the value again. print "Final quantity for blue items: $bbSaved[blue] <br>"; // but it still prints 100 3 - reset_quantity.php include("declare_it.php"); print "Starting quantity for blue items: $bbSaved[blue] <br>"; //this prints 100 $bbSaved[blue] = 11; print "final quantity for blue items: $bbSaved[blue]<br>"; //this prints 11 the problem is: in file #2, gold_digger.php, when I print the quantity, it's always the original 100. I tried to put Global... I tried anything I can think of.. Just can't get it to print the new quantity. Can you help please. Thanks. Quote Link to comment Share on other sites More sharing options...
CoreyR Posted June 23, 2007 Share Posted June 23, 2007 unlink($variable); should work Quote Link to comment Share on other sites More sharing options...
game2002 Posted June 23, 2007 Author Share Posted June 23, 2007 Thanks Corey but I don't understand. I am not trying to delete a file. How would link($variable) help? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.