Forums / Developer / urgent: php eZSelection array output
André R.
Thursday 06 April 2006 11:43:49 am
using the csvexport contribution, I had to add ezselection for a project.Bu I have no idea how i extract the right array dimmension to get the selected data in the eZSelection data type.
Code for eZXMLText is like this:
$content=&$attribute->content(); return $this->escape($content->XMLData, $seperationChar);
my current code for ezselection is this:
$content=&$attribute->content(); return $this->escape($content, $seperationChar);
witch returns the text 'Array', probably because I try to return an array.. :)
Anybody know the right code to get selected selection ???
eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription @: http://twitter.com/andrerom
Thursday 06 April 2006 1:04:16 pm
okey, I now got this
$content=&$attribute->content(); return $this->escape($content[0], $seperationChar);
By using var_dump a lot.
So now I get the int of the selected selection. But I couldn't see any of the possible selections in text anywhere.Are they there somewhere ????
Kristof Coomans
Thursday 06 April 2006 11:21:26 pm
These topics will help you:
http://ez.no/community/forum/developer/image_link_question http://ez.no/community/forum/developer/storing_content_in_an_ezselection_attribute http://ez.no/community/forum/setup_design/filter_content_passing_values_from_urlhttp://ez.no/community/forum/developer/php_store_values_from_a_selection_multiple
independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org
fagnou jérôme
Tuesday 22 February 2011 8:47:23 am
I use csv export has a field with contains an ezselection attribute (hobbies 1,hobbies 2,hobbies 3,hobbies 4,hobbies 5) When I run the export, I get the following result when the field contains more than one selection :
ezselection,"2009-12-20","2011-12-19"
For one selection i have this :
hobbies 1,"2009-12-20","2011-12-19"
Is it possible to display all the selections in the same field? or possibly to separate them (Maybe 5 fields) ?