By mattm on
Hi,
This more has to do with a php question.
I edited a function, the profile_view function to be exact, but I want to let two variables get output.
They are:
return array(t('Images') => $images);
return $fields;
Ofcourse this doesn't work, since only the first return gets printed and then the fuction would stop. Combining the two has failed for me so far. Any suggestions?
Comments
why not...
Try this.
Return array(t('Images') => $images, 'fields' => $fields);
So in your main function you load the array by doing something like this:
$myarray = myfuction(variables);
Then when you want to access the fields section, just call your new array and specify the fields key... like this:
Print ($myarray[fields]);
Or you can assign it to a value like this:
$myfields = $myarray[fields];
You should be able to access the Images key in the exact same way.
Mateo