Albab
Albab

Reputation: 384

php Get value from SimpleXMLElement Object

I have this code:

    echo "<pre>Disk Limit: ";
    print_r($result['disklimit']);
    echo "</pre>";

which outputs:

    Disk Limit: SimpleXMLElement Object
    (
        [0] => 990000M
    )

In simple words, this is what I want to show:

    Disk Limit: 990000M

I have searched similar questions but couldn't find an appropriate answer. Thanks in advance :)

Upvotes: 0

Views: 43

Answers (1)

Langusten Gustel
Langusten Gustel

Reputation: 11002

I guess this should just work:

echo "Disk Limit: ".$result['disklimit'][0];

or did I miss something?

Upvotes: 1

Related Questions