Answer the question
In order to leave comments, you need to log in
After $wpdb->get_results there is a filled array, but you can't access its elements?
$result = $wpdb->get_results("SELECT * FROM table WHERE qwe='$qwe'" ,ARRAY_N
);
print_r($result);
//выводит нужный результат
// Array ( [0] => Array ( [0] => 13 [1] => поле1 [2] => поле2 [3] => поле3 ) )
foreach($result AS $key=>$value) {
echo $key . " -> " . $value;
}
//выдает
//0 -> Array
echo ($result[2]);
//пустой результат
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question