Welcome Guest, Not a member yet? Register   Sign In
[Solved] Return $data question
#7

(02-15-2016, 03:27 AM)Avenirer Wrote: if you defined the $message depending on the if statement, then you should also return the $message from inside the if statement...

Code:
public function display_error_messages($open_tag = '<p>', $close_tag = '</p>') {

        if (isset($this->error_message)) {

            $message = "";

            foreach($this->error_message as $msg) {
                $message .= $open_tag . $msg . $close_tag;
            }
           return $message;


        }
       return FALSE; // or whatever you want to return in case there are no error messages...

        

    } 
But it is you who should tell me if it's correct or not Smile


Thank you for help it all works now. And thank you to every body else to.
There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply


Messages In This Thread
[Solved] Return $data question - by wolfgang1983 - 02-15-2016, 02:35 AM
RE: Return $data question - by Diederik - 02-15-2016, 02:51 AM
RE: Return $data question - by wolfgang1983 - 02-15-2016, 02:57 AM
RE: Return $data question - by Avenirer - 02-15-2016, 03:02 AM
RE: Return $data question - by wolfgang1983 - 02-15-2016, 03:06 AM
RE: Return $data question - by Avenirer - 02-15-2016, 03:27 AM
RE: Return $data question - by wolfgang1983 - 02-15-2016, 03:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB