get a Response in php

//******************get a Response in php *******************

function print_response($status,$status_message,$data)
{
    header("HTTP/1.1 $status $status_message");
    $response = array();
    $response['status'] = $status;
    $response['message'] = $status_message;
    $response['data'] = $data;
    return json_encode($response);   
}
Share on Google Plus

About quora Questions & Answers A-Z

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment