tengo este codigo, algo me anda mal...
me podrian ayudar con que es___
<select name="element">
<?php
try
{
/*** query the database ***/
$result = obligatoriodbDB::getInstance()->query("SELECT * from categorias");
/*** loop over the results ***/
foreach($result as $row)
{
/*** create the options ***/
echo '<option value="'.$row['atomicnumber'].'"';
if($row['atomicnumber']==42)
{
echo ' selected';
}
echo '>'. $row['english'] . '</option>'."\n";
}
}
catch(PDOException $e)
{
echo 'No Results';
}
?>
</select>
gracias Saludos
Q error te muestra?
Se llaman excepciones:
http://php.net/manual/en/language.exceptions.php
Dinos que error te sale?