Hey guys
Thanks for all the help, it looks like using the constants and parameters combination might be the way to go. I think what Piranha is suggesting is that I need to tighten up on my error checking and I shouldn't be calling this function if the data passed isn't correct?
I use this function for running queries so it checks the data its sent and reports any errors. As this function can be called many times from the same function and the same script, using the constants might save me a lot of the hard work of trying to discover exactly where the data has come from.
Shame you can't just do
function c ($params, $refer=FUNCTION) {
if ($error) {
return $refer;
}
Thanks again guys, I'll leave this unresolved in case anyone has any feedback
Tim