CHAPTER 7 SIMPLEXML 263 Listing 7-4. PAD
CHAPTER 7 SIMPLEXML 263 Listing 7-4. PAD Generator Application
Fields->Field as $field) { /* Get the node path used in the template */ $arPath = explode(”/”, trim($field->Path)); array_shift($arPath); /* Skip MASTER_PAD_VERSION_INFO nodes. Values for these are set by template generator */ if ($arPath[0] != “MASTER_PAD_VERSION_INFO”) { if ($arPath[0] != $section) { $section = $arPath[0]; print ““.str_replace(”_”,” “, $section).”
“; } $input_value = getStoredValue($sxetemplate, $arPath); array_shift($arPath); print “n”.$field->Title.’: ‘; if ($bPreview) { print $input_value.”
“; } else { $input_name = $section; /* Generate the field name using named-based keys for an array */ foreach ($arPath AS $key=>$value) { $input_name .= “[$value]”; } print ‘
‘; } } } }
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Cheap Web Hosting services