I'm currently trying to clean up my array. array_unique()
doesn't bring the hoped solution for this.
I'm getting to different arrays from 2 different database queries. Both are getting the array infos with mysqli_fetch_array()
.
This is my code. The MySQL-queries doesn't matter at this point:
$gti = mysqli_fetch_array($get_trans_info_query);
$gt = mysqli_fetch_array($get_trans_query);
$returnInfoArray['transaction'] = $gt;
$returnInfoArray['transaction_info'] = $gti;
return $returnInfoArray;
//Calling the function now:
$transInfo = $payment->getTransactionInfo($transId, $userInfo['id']);
echo "<br><pre>";
print_r($transInfo);
echo "</pre><br>";
This brings me now this:
One thing I can do is to add every column into that array, but I hope that this could be done quicker. I don't want these array positions ([0], [1], etc.) but only the column names without writing the array manually into it.
Is there a way to do it?