View Single Post
06-04-2012, 11:04 PM
.Nick is offline .Nick
.Nick's Avatar
Status: Request a custom title
Join date: Feb 2005
Posts: 1,159
iTrader: 3 / 100%

.Nick is on a distinguished road


Originally Posted by Dan View Post
It's just a bunch of if statements.

Run them through your head with: ($user = "username") || ($user = null)

I cannot create variables that can be used outside of the function from the function? Like:

function username($user) {
if($user = null)
$deleted = "deleted";

Then when the function is called username($username); I can echo $deleted? Is something like this at all possible? My tests show the above wouldn't work.

You could declare $deleted outside the function and then get access to it inside a function with the global keyword.

Not that I'm saying that's a good idea or anything.