I cannot get any of the following code to work with the statements array I am working with.
if (!$allowed)
{
$output = array('success'=>false, 'message'=>'Insufficient User Access', 'args'=>$_POST);
}
else
{
$output = isset($_POST['data']) ? $output = call_user_func(array($controller, $_POST['request']), $_POST['data']) : call_user_func(array($controller, $_POST['request']));
}
echo $output = $output ? json_encode($output) : json_encode(false);
This last statement is what is generating the error. I have tried mb_chekc_encloding and iconv. I cannot get either of these statements to work with making the $output actually show.