I have the following cards (cards) which are arrays with information inside, below it brings me many more arrays but now I want that when I press the state that is in the select it brings me by the state that I select Ejquee aprej trujillo they show me everything trujillo ... I tried javascript with clik event but at the time of appears only shows things like text (the css does not show and if I include css simply does not show)
THIS IS PART OF THE CODE ... the part of the card are simply another array
<?php
$stads= array("MIRANDA", "AMAZONA", "ANZOATEGUI"," APURE"," ARAGUA"," BARINAS"," CARABOBO"," COJEDES"," DELTA AMACURO"," DISTRITO CAPITAL"," CARACAS"," FALCON"," LARA"," MERIDA"," MONAGAS"," NUEVA ESPARTA"," PORTUGUESA","SUCRE","TACHIRA"," TRUJILLO"," VARGAS"," YARACUY"," ZULIA ");
$arrlength= count($stads);
echo "
<div class='col-md-3'>
<div class='form-group'>
<label for='cuadro1'>Estados:</label>
<select class='form-control' id='cuadro1'>
";
echo "<option value='' id='cuadro2'></option>";
for ($x=0; $x < $arrlength ; $x++) {
if ($stads [$x]!=null ) {
$cc= $stads[$x];
echo "<option value='$cc' id='cuadro2'>$cc</option>";
}
}
echo " </select>
</div>
</div>";
?>
<br>
<br>
<hr>
<script>
document.getElementById("cuadro1").addEventListener("click", myFunction);
function myFunction() {
document.getElementById("cuadro3").innerHTML = "<?php echo"(ACA NO PUEDO INCLUIR CSS )" ?>";
}
</script>
<div id="cuadro3"></div>