I have a script in which $count = "5"; Now at the bottom of my script is: $count = $whosonline; This simply transfers the value of $count to $whosonline, which I use in the next part of the script. The whole thing works perfectly fine, but my error log gives me: [error] PHP Notice: Undefined variable: whosonline in [directory] on line 38 Not sure why it's doing that. Is it that I'm not supposed to be introducing variables just like that? Would it make a difference if I did $whosonline = $count? Thanks.
Should it not be that $whoisonline = $count and not the other way around as described in your post ? $count is already functioning without errors because it has a value, thus its defined, so now you need to apply the value to $whoisonline rather then changing the variable name to $whoisonline So at the bottom of your script or wherever else is appropriate, in preparation for the second part of your script: $whoisonline = $count; PHP: