It happens that I have a array
with the following data:
$sistemas2 = array('BILLETERO', 'VIDEO', 'CONTROL DE ACCESO',
'CONTROL DE ACCESO VIDEO', 'ALARMA', 'ALARMA VIDEO');
And I go through it in a select to generate a <option>
for each data that is found in the following way:
foreach ($sistemas2 AS $valor2) { ?>
<option <?php if ($sistemas2 == $valor2){
?>selected <?php }
?>> <?php echo $valor2; ?>
</option> <?php
}
}
?>
What I want is that each option has a specific value different from the one shown by the array, to make a query to the database. example:
<option value="controles">BILLETERO</option>