<?php
'titulo' => 'Bleach',
'resumo' => 'xxx',
'categoria' => 'Ação, Comédia'
),
'titulo' => 'Titulo livro 2',
'resumo' => 'xxx',
'categoria' => 'Ação, Psicológico, Romance...'
),
'titulo' => 'Titulo livro 3',
'resumo' => 'xxx',
'categoria' => 'romance, Vampiros ...'
)
);
foreach($livros as $livro => $data) {
if(stripos($data['categoria'], 'Romance') !== false) { $matches[] = $livro;
}
}
PD9waHAKJGxpdnJvcyA9IGFycmF5KAogICAgJ2xpdnJvIDEnID0+IGFycmF5KAogICAgICAgICd0aXR1bG8nID0+ICdCbGVhY2gnLAogICAgICAgICdyZXN1bW8nID0+ICd4eHgnLAogICAgICAgICdjYXRlZ29yaWEnID0+ICdBw6fDo28sIENvbcOpZGlhJwogICAgKSwKICAgICdsaXZybyAyJyA9PiBhcnJheSgKICAgICAgICAndGl0dWxvJyA9PiAnVGl0dWxvIGxpdnJvIDInLAogICAgICAgICdyZXN1bW8nID0+ICd4eHgnLAogICAgICAgICdjYXRlZ29yaWEnID0+ICdBw6fDo28sIFBzaWNvbMOzZ2ljbywgUm9tYW5jZS4uLicKICAgICksCiAgICAnbGl2cm8gMycgPT4gYXJyYXkoCiAgICAgICAgJ3RpdHVsbycgPT4gJ1RpdHVsbyBsaXZybyAzJywKICAgICAgICAncmVzdW1vJyA9PiAneHh4JywKICAgICAgICAnY2F0ZWdvcmlhJyA9PiAncm9tYW5jZSwgVmFtcGlyb3MgLi4uJwogICAgKQopOwokbWF0Y2hlcyA9IGFycmF5KCk7CmZvcmVhY2goJGxpdnJvcyBhcyAkbGl2cm8gPT4gJGRhdGEpIHsKICAgIGlmKHN0cmlwb3MoJGRhdGFbJ2NhdGVnb3JpYSddLCAnUm9tYW5jZScpICE9PSBmYWxzZSkgewogICAgICAgICRtYXRjaGVzW10gPSAkbGl2cm87IAogICAgfQp9CnByaW50X3IoJG1hdGNoZXMpOw==