Hi,

i created a Webform and now i should like to edit the submission-template.

with var_dump($form['submission']); i get the following output:

array(17) { ["#type"]=> string(5) "value" ["#value"]=> object(stdClass)#24 (6) { ["nid"]=> string(1) "4" ["sid"]=> string(2) "12" ["uid"]=> string(1) "1" ["remote_addr"]=> string(13) "91.19.195.155" ["submitted"]=> string(10) "1257663234" ["data"]=> array(3) { [2]=> array(1) { ["value"]=> array(1) { [0]=> string(7) "sdadasd" } } [3]=> array(1) { ["value"]=> array(1) { [0]=> string(6) "asdasd" } } [1]=> array(1) { ["value"]=> array(1) { [0]=> string(344) "a:10:{s:8:"filename";s:9:"grün.jpg";s:8:"filepath";s:44:"sites/default/files/webform/upload/grün.jpg";s:8:"filemime";s:10:"image/jpeg";s:6:"source";s:4:"bild";s:11:"destination";s:44:"sites/default/files/webform/upload/grün.jpg";s:8:"filesize";s:6:"106303";s:3:"uid";s:1:"1";s:6:"status";i:1;s:9:"timestamp";i:1257663234;s:3:"fid";s:2:"15";}" } } } } ["#post"]=> array(0) { } ["#programmed"]=> bool(false) ["#tree"]=> bool(false) ["#parents"]=> array(1) { [0]=> string(10) "submission" } ["#array_parents"]=> array(1) { [0]=> string(10) "submission" } ["#weight"]=> int(0) ["#processed"]=> bool(false) ["#description"]=> NULL ["#attributes"]=> array(0) { } ["#required"]=> bool(false) ["#input"]=> bool(true) ["#name"]=> string(10) "submission" ["#id"]=> string(15) "edit-submission" ["#defaults_loaded"]=> bool(true) ["#sorted"]=> bool(true) }

can somebody tell me who i get : a:10:{s:8:"filename";s:9:"grün.jpg";s:8:"filepath";s:44:"sites/defaul... unserialized?

i need Variables like:
$file = grün.jpg
and so on...

i hope you understand what i mean, and you can help me.

Comments

marcvangend’s picture

Hi Alex, welcome to the Drupal community.
Unserializing is done with the unserialize() function: http://php.net/manual/en/function.unserialize.php.
However, this is usually not needed when you use the theme system and theme overrides properly. Since you just joined drupal.org, let me give you a link to the Drupal 6 theme guide and especially the part about theme overrides. Understanding the concept of theme overrides (including preprocess functions) is very important if you want full control over the output without having to edit module files. It is important that you never changes the files of Drupal core and downloaded modules, because if you do, installing a (security) update could revert your changes and break your site.