Re: [PHP] simplexml problem
- From: quickshiftin@xxxxxxxxx ("Nathan Nobbe")
- Date: Mon, 31 Dec 2007 10:14:28 -0500
On Dec 31, 2007 10:09 AM, Dani Castaños <danitao.mailists@xxxxxxxxx> wrote:
Thanks! Problem fixed... But I think PHP must do the cast automatically.
I think it's a bug fixed in a further version than mine as I've read
no problem; but just fyi, its not a bug; the behavior is as expected per the
manual:
http://us3.php.net/manual/en/ref.simplexml.php
*Example#6 Comparing Elements and Attributes with Text*
To compare an element or attribute with a string or pass it into a function
that requires a string,
you must cast it to a string using *(string)*. Otherwise, PHP treats the
element as an object.
if you use an operation that casts implicitly, such as echo, you dont have
to cast yourself;
otherwise you do :)
-nathan
- References:
- simplexml problem
- From: Dani Castaños
- Re: [PHP] simplexml problem
- From: "Nathan Nobbe"
- Re: [PHP] simplexml problem
- From: Dani Castaños
- simplexml problem
- Prev by Date: Re: [PHP] simplexml problem
- Next by Date: Re: Last Day of Year Date Bug?
- Previous by thread: Re: [PHP] simplexml problem
- Next by thread: Last Day of Year Date Bug?
- Index(es):
Relevant Pages
|