A
Audun Røe
Hi,
I have a list of codes which I want translated into something
"understandable". Is there a mechanism such as hashtables that could
handle this? (eg. PHP: array('F' => 'Foo', 'C' => 'Cat'))
It just seems as if a page worth of if-tests would be a fairly clumsy
solution to this (there are a lot of codes) problem.
Basically, I have an XML-document which looks like something like
this:
<Element T="F">.....</Element>
...and I want it transformed into the code's corresponding descriptive
name, like so (F ==> Foo):
<NewElement DN="Foo">.....</NewElement>
All sugestions appreciated!
I have a list of codes which I want translated into something
"understandable". Is there a mechanism such as hashtables that could
handle this? (eg. PHP: array('F' => 'Foo', 'C' => 'Cat'))
It just seems as if a page worth of if-tests would be a fairly clumsy
solution to this (there are a lot of codes) problem.
Basically, I have an XML-document which looks like something like
this:
<Element T="F">.....</Element>
...and I want it transformed into the code's corresponding descriptive
name, like so (F ==> Foo):
<NewElement DN="Foo">.....</NewElement>
All sugestions appreciated!