Mala pomoc sa foreach loop


#1

pozz,

dali mi moze ko pomoci oko ovakve strukture da to ispisem sa foreach-om

array(6) { 
[0]=> string(1) "1" ["id"]=> string(1) "1" 
[1]=> string(1) "5" ["order_type"]=> string(1) "5" 
[2]=> string(1) "0" ["orderprofit"]=> string(1) "0" 
}

probo sam ovako ali mi izbacuje neke hiroglife umjesto stvarnih rezultata

$query = mysqli_query($conn, "SELECT id, order_type, orderprofit FROM trade_log WHERE order_type = '2' OR order_type = '3' OR order_type = '4' OR order_type = '5'");
$aa = mysqli_fetch_array($query);


foreach ($aa as $b) {
    echo 'ID:' . $b["id"] . ', ' . 'ORDER TYPE : ' . $b["order_type"] . ', ORDER PROFIT: ' . $b["orderprofit"] . '<hr>';
}

#2

A da c/p -iraš hijeroglife pa da i mi preciznije uočimo tačan problem?


#3

Probaj $aa = mysqli_fetch_array($query, MYSQLI_ASSOC); ?