For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > December 2005 > Associative Arrays with special characters









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Associative Arrays with special characters
Andrew Nagy

2005-12-13, 7:07 pm

I have a serialized XML document in an associative array using
XML_Serializer. Due to the use of namespaces, many of the elements in
the document use a colon (:) within the name. Since the names are
stored as the array key, this causes problems with smarty.

How do I reference a variable such as this within smarty:
$array['xlink:href'] ?

When I attempt to use the correct syntax {$array.xlink:href} I get the
following error:
syntax error: unrecognized tag

Any ideas?

Thanks
Andrew
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com