i have 2 array from mysqli_fetch_assoc from 2 different db from 2 different server. my main secondary server are federated disabled and root disabled by my office so i decide to call manuall via php fetch assoc.. here is my result in table
NO. USERID USERNAME USERSTATUS other NAME
1 1 daffa 1 2 Sugeng
2 2 meito 1 4 Sugeng lagi
NO. USERID USERNAME USERSTATUS row is from $new_array1 other NAME is from $new_array2
then here is my code
$i = 1;
while(($new_array1 = mysqli_fetch_assoc( $result1)) && ($new_array2 = mysqli_fetch_assoc( $result2))){
echo '
<tr>
<td>'.$i.'</td>
<td>'.$new_array1['userid'].'</td>
<td>'.$new_array1['username'].'</td>
<td>'.$new_array1['userstatus'].'</td>
<td>'.$new_array2['other'].'</td>
<td>'.$new_array2['NAME'].'</td>
</tr>
';
$i++;
}
but there is still 2 array, how to combine 2 array from fetch assoc ? i wanna make it single array then while it to show the data