Created
February 27, 2019 17:07
-
-
Save x22element/4eec614f3dedb301a800d6f384e0b8b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
private function response($aData,$isError = false, $redirectTo = false){ | |
$aResult = [ | |
'success' => $isError ? 'false' : 'true', | |
'data' => [] | |
]; | |
if(is_array($aData)) | |
{ | |
foreach ($aData as $key => $val) | |
{ | |
$aResult['data'][$key] = $val[0]; | |
} | |
} else { | |
$aResult['data']['response'] = $aData; | |
} | |
if($redirectTo) | |
{ | |
$aResult['data']['href'] = $redirectTo; | |
} | |
exit (json_encode($aResult, JSON_UNESCAPED_UNICODE)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ROFLLLL. Combowhore Result