Re: [PHP] Array and Object



Well anyways please let me handle the problems with decoding. I just
want to know if there is a way that I could traverse through all the
elements of the simplexmlobject and still keep the same structure of
the array. What I mean is

[Advanced Virtualization Technologies in Workstation 6-20080320 1604]
=> SimpleXMLElement Object
(
[recordingID] => 932467
[hostWebExID] => marketingprograms
[name] => Title
[createTime] => 03/20/2008 09:04:42
[timeZoneID] => 4
[size] => 49.441048
[recordingType] => 0
[duration] => 3218
)

Go through all the elements of the object and do some encoding and get
back the same array structure.

In raw terms I need to know the procedure that does this and still
keep the same structure of the array.

[Advanced Virtualization Technologies in Workstation 6-20080320 1604]
=> SimpleXMLElement Object
(
[recordingID] => utf8_decode(932467)
[hostWebExID] => utf8_decode(marketingprograms)
[name] => utf8_decode(Title)
[createTime] => utf8_decode(03/20/2008 09:04:42)
[timeZoneID] => utf8_decode(4)
[size] => utf8_decode(49.441048)
[recordingType] => utf8_decode(0)
[duration] => utf8_decode(3218)
)






On Mon, Mar 24, 2008 at 10:10 AM, tedd <tedd.sperling@xxxxxxxxx> wrote:
At 10:00 AM -0700 3/24/08, VamVan wrote:
>I cannot do that. because Simple xml element retrieves everything in
>UTF8. I need to decode it to latin1 for comparison with another array.

Unless there is something here that I don't understand, there is no
decoding UTF-8 to Latin1

Latin1 is a subset of UTF-8 -- what you find (characters) in Latin 1
is the same as in UTF-8.

If you have a code point (character) that lies outside of the range
of Latin 1, then there is no solution.

Cheers,

tedd


--
-------
http://sperling.com http://ancientstones.com http://earthstones.com

--


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


.



Relevant Pages

  • Re: Huffman decoding table or the "codebook"
    ... I am doing experiments with Huffman coding. ... how the coding and decoding work. ... I suspect the codebook has to contain something more than just ... and returning the current position in the array (the ...
    (comp.compression)
  • Re: Compressing a String?
    ... > Try to use a named charset when converting string to a byte array. ... > Try to use same charset decoding the array back to java unicode string. ...
    (comp.lang.java.programmer)
  • Re: String that points to byte()
    ... > be able to use the data from that array instead of creating objects from it. ... can I create a String object whose contents are stored in that ... create a object that POINTS to some offset in the array. ... Have you actually determined that decoding the data in the normal way ...
    (microsoft.public.dotnet.framework.compactframework)
  • SimpleXMLElement Object into array
    ... How do I put the value of an SimpleXMLElement Object into any array ... how do I get "Mother" and put it in an array? ... if I echo $title, it says "Mother" but if I put it in an array ...
    (comp.lang.php)