strange class with nested {} (PHP)
this code is originally from Joomla! custom form. All i want is to get the caption on the field and its body variables to put them in an email. I did var_dump($form) and was surprised with what i saw:
stdClass Object ( [FormId] => 10 [FormName] => contacts [FormLayout] =>{global:formtitle}{error}{name:caption}*{name:body}{name:validation}{name:description}{message:caption}*{message:body}{message:validation}{message:description}{email:caption}*{email:body}{email:validation}{email:description}{Send:caption}{Send:body}{Send:validation{Send:description}]
can anyone tell me how should i access those variables? (eg.{name:开发者_开发问答caption} {name:body})
Thanks in advance.
That is a normal string containing template variables of some sort.
You would have to parse $object->FormLayout
using the correct method - it can probably be found inside Joomla's code somewhere.
This is a php object and cannot be accessed like an array $array["FormLayout"]
精彩评论