Re: error en PHP?
| From: | Alejandro Garín | Date: | Thu, 04 Jan 2001 20:24:49 +0000 |
| Subject: | Re: error en PHP? | ||
| References: | 1 2 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-5506@lists.php.net to get a copy of this message | ||
> >
> > if ($algo) {
> >
> > echo"<p>Algo</p>";
> >
> > }
> >
> > else {
> >
> > echo"<p>Hola</p>";
> >
> > }
> >
> > Ante este sencillo código, en vez de devolverme Hola, me manda:
> >
> > Warning: Undefined variable: algo in c:\htdocs\public_html\index.php on
line
> > 3
> > Hola
proba asi:
if( isset($algo) && ($algo) )
{
....
}
else
{
....
}
Saludos,
Alejandro