Last active
August 29, 2015 14:14
-
-
Save pierew/a9bc692207615d029395 to your computer and use it in GitHub Desktop.
PHP Mysql -> PHP Array Converter Function
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
/* | |
* You need to set the Parameter $ResultSet to your Direct Result From $db->query("Select ...", MYSQLI_USE_RESULT) | |
* | |
* | |
*/ | |
function arrayConvertMySQLToPHP($ResultSet) { | |
$phparray = array(); | |
while($row = mysqli_fetch_assoc($ResultSet)){ | |
array_push($phparray, $row); | |
} | |
return $phparray; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment