Re: php bug?

From: Date: Sun, 26 Sep 2010 16:34:12 +0000
Subject: Re: php bug?
References: 1  Groups: php.xml.dev 
Request: Send a blank email to [email protected] to get a copy of this message
On Sun, Sep 26, 2010 at 12:36 AM, mcberta2 <[email protected]> wrote:

> Hello everyone.
> The following is an extract of a routine returning error messages from a
> xml file:
>
> function title($index)
> {
> $xml = simplexml_load_file("lingo.xml");
> return $xml->message[$index];
> }
>
> The problem is that if I call the routine with a value [ex. title(6)] I
> receive the message, whereas if I call the routine with a variable [ex.
> title($value) where $value=6] there is no way I can receive the message.
>
> I tried in many different ways but it looks like it's a bug of simple_xml.
>

This isn't too helpful, but I'm 99.94% it's something in your code.

Simplify your code until you find the shortest piece that works and then add
back lines until you find your error.

-adam


Thread (7 messages)

« previous php.xml.dev (#629) next »