I'm receiving a error message explaining the following error.
json_encode() expects at most 2 parameters, 3 given</p>
When I make the call to the json_encode function I have all three of the paramters set with accpted values.
I"m trying to figure out why this is because when I do tests on my code I get all accepted values with this function. Any thoughts? I think it 's something to do with the switch statement but I need further verifcation as well as information on what I'm doing wrong. Can someone enlighten me please?
public function output($message, $title, $status)
{
switch ($status)
{
case 'Error':
array('status' => 'Error');
break;
case 'Notice':
array('status' => 'Notice');
break;
case 'Success':
array('status' => 'Success');
break;
}
echo json_encode($status, $title, $message);
}