<?php
"name" => "Бред" ,
"first-thread" => "Webm-тред" ,
"second-thread" => "Тред няшных котиков"
)
) ,
"name" => "Сериалы" ,
"first-thread" => "Доктор Кто" ,
"second-thread" => "Шерлок Холмс" ,
"third-thread" => "Игра престолов"
)
) ,
"name" => "Программирование" ,
"first-thread" => "Клуб изучающих PHP" ,
"second-thread" => "JavaScript тред" ,
"whoops" => "C++ тред"
)
) ,
"name" => "Фильмы" ,
"pinned thread" => "Поиск кино" ,
"first-thread" => "Драйв" ,
"second-thread" => "Мертвец Джима Джармуша"
)
)
) ;
foreach ( $boards as $section => $objects ) {
foreach ( $objects as $threads => $threadsName ) {
if ( $threads == 'name' ) {
echo "Название доски: {$threadsName} \n " ;
} else {
$countThreads = count ( $threadsName ) ;
echo "Треды:\n " ;
foreach ( $objects [ $threads ] as $threadsName ) {
echo " {$threadsName} \n " ;
}
echo "Количество тредов: {$countThreads} \n " ;
}
}
}
PD9waHAKCiRib2FyZHMgPSBhcnJheSgKICAgICIvYi8iID0+IGFycmF5KAogICAgICAgICJuYW1lIiA9PiAi0JHRgNC10LQiLAogICAgICAgICJ0aHJlYWRzIiA9PiBhcnJheSgKICAgICAgICAgICAgImZpcnN0LXRocmVhZCIgPT4gIldlYm0t0YLRgNC10LQiLAogICAgICAgICAgICAic2Vjb25kLXRocmVhZCIgPT4gItCi0YDQtdC0INC90Y/RiNC90YvRhSDQutC+0YLQuNC60L7QsiIKICAgICAgICApCiAgICApLAogICAgIi90di8iID0+IGFycmF5KAogICAgICAgICJuYW1lIiA9PiAi0KHQtdGA0LjQsNC70YsiLAogICAgICAgICJ0aHJlYWRzIiA9PiBhcnJheSgKICAgICAgICAgICAgImZpcnN0LXRocmVhZCIgPT4gItCU0L7QutGC0L7RgCDQmtGC0L4iLAogICAgICAgICAgICAic2Vjb25kLXRocmVhZCIgPT4gItCo0LXRgNC70L7QuiDQpdC+0LvQvNGBIiwKICAgICAgICAgICAgInRoaXJkLXRocmVhZCIgPT4gItCY0LPRgNCwINC/0YDQtdGB0YLQvtC70L7QsiIKICAgICAgICApCiAgICApLAogICAgIi9wci8iID0+IGFycmF5KAogICAgICAgICJuYW1lIiA9PiAi0J/RgNC+0LPRgNCw0LzQvNC40YDQvtCy0LDQvdC40LUiLAogICAgICAgICJ0aHJlYWRzIiA9PiBhcnJheSgKICAgICAgICAgICAgImZpcnN0LXRocmVhZCIgPT4gItCa0LvRg9CxINC40LfRg9GH0LDRjtGJ0LjRhSBQSFAiLAogICAgICAgICAgICAic2Vjb25kLXRocmVhZCIgPT4gIkphdmFTY3JpcHQg0YLRgNC10LQiLAogICAgICAgICAgICAid2hvb3BzIiA9PiAiQysrINGC0YDQtdC0IgogICAgICAgICkKICAgICksCiAgICAiL21vdi8iID0+IGFycmF5KAogICAgICAgICJuYW1lIiA9PiAi0KTQuNC70YzQvNGLIiwKICAgICAgICAidGhyZWFkcyIgPT4gYXJyYXkoCiAgICAgICAgICAgICJwaW5uZWQgdGhyZWFkIiA9PiAi0J/QvtC40YHQuiDQutC40L3QviIsCiAgICAgICAgICAgICJmaXJzdC10aHJlYWQiID0+ICLQlNGA0LDQudCyIiwKICAgICAgICAgICAgInNlY29uZC10aHJlYWQiID0+ICLQnNC10YDRgtCy0LXRhiDQlNC20LjQvNCwINCU0LbQsNGA0LzRg9GI0LAiCiAgICAgICAgKQogICAgKQopOwoKZm9yZWFjaCAoJGJvYXJkcyBhcyAkc2VjdGlvbiA9PiAkb2JqZWN0cykgewoKCWZvcmVhY2ggKCRvYmplY3RzIGFzICR0aHJlYWRzID0+ICR0aHJlYWRzTmFtZSkgewoKCQlpZiAoJHRocmVhZHMgPT0gJ25hbWUnKSB7CgkJCgkJCWVjaG8gItCd0LDQt9Cy0LDQvdC40LUg0LTQvtGB0LrQuDogeyR0aHJlYWRzTmFtZX1cbiI7CgkJCQoJCX0gZWxzZSB7CgoJCQkkY291bnRUaHJlYWRzID0gY291bnQoJHRocmVhZHNOYW1lKTsKCQkJCgkJCWVjaG8gItCi0YDQtdC00Ys6XG4iOwoJCQkKCQkJZm9yZWFjaCAoJG9iamVjdHNbJHRocmVhZHNdIGFzICR0aHJlYWRzTmFtZSkgewoKCQkJCWVjaG8gIiAgICB7JHRocmVhZHNOYW1lfVxuIjsKCQkJCQoJCQl9CgkJZWNobyAi0JrQvtC70LjRh9C10YHRgtCy0L4g0YLRgNC10LTQvtCyOiB7JGNvdW50VGhyZWFkc31cbiI7CgkJfQoJfQp9Cg==