Код: Выделить всё
Array (
0 => Array (
'id' => 1,
'name' => 'Hack n\' Slash',
'slug' => 'hack-n-slash',
'popular' => 0
),
1 => Array (
'id' => 2,
'name' => 'FPP',
'slug' => 'fpp',
'popular' => 1
),
2 => Array (
'id' => 3,
'name' => 'RPG',
'slug' => 'rpg',
'popular' => 1
)
)
Популярные:
- один
- два
- один
- два
Код: Выделить всё
foreach($genres as $genre) :
if($genre['popular'] == '1' :
echo $genre['name'];
endif;
endforeach;
Код: Выделить всё
if($genre['popular'] == '0')
Как мне этого добиться?
Подробнее здесь: https://stackoverflow.com/questions/117 ... lumn-value