Status; //======== 1 = All is well, 2= Something not working if($api_status == 1){ echo $obj->USD_to_PKR_live_Rate; //==== Getting Live USD to PKR Market rate }else{ echo $obj->Error; //=== Showing Error } ?>