Ver originalif ($listado = mysql_query("select * from noticia where categoria='$categoria' and estado=1")) {// etc } else { echo "No se puedo hacer";}