I have problem extracting data from 2 mysql db and create a multidimensional array:
$query = "SELECT * FROM MRT_PRODUCTS" or die( "Error in the consult.." . mysqli_error( $link ) );
$result = mysqli_query( $link, $query );
$rows = array();
while ( $row = mysqli_fetch_array( $result, MYSQLI_ASSOC ) ) {
$rows[] = array(
'IDF' => $row[ 'IDF' ],
'NAME' => $row[ 'NAME' ],
'DETAILS' => $row[ 'DETAILS' ]
);
}
with this I extract product but I have another db that contains the pictures of products, so I would extract also them like to create this array:
products[
IDF:'1',
NAME:'Computer',
DETAILS:'Computer desktop celeron intel',
PIC:['foto1.jpg',foto2.jpg,ecc..]
]
how is it possible?