in reply to returns not working
What I ended up doing was removing all the returns, replacing them with a variable I set based on which condition was met.
I wrapped it all in a while ( $status = 99 ) and set the status to the exit value I wanted based on the condition.
Then I used just one return at the end, which passes the $status and variable back to the calling function and it works just fine.
I'm well aware that I need some serious help in the formating of code and I'll be looking for references on how to do this, but this was (as seems to be a recuring theme) an urgent, must do now sort of thing and with my very limited understanding of any programming in general, I'm just happy I got it to work.
Again, thank you all for the input.
|
|---|