• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
show_error() to JSON

#1
Hi Guys,

Is there any way to get a JSON Version of "show_error" method?

Thanks
Reply

#2
Something like this?

PHP Code:
function show_error_json$message )
{
 
   $status = array();
 
   $status["success"] = FALSE;
 
   $status["message"] = $message;

 
   header("Content-Type: application/json");

 
   echo json_encode($status);
 
   exit;

Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.