eZ Community » Forums » Developer » urgent: php eZSelection array output
expandshrink

urgent: php eZSelection array output

urgent: php eZSelection array output

Thursday 06 April 2006 8:43:49 pm - 3 replies

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.. happy.gif Emoticon

Anybody know the right code to get selected selection ???

Thursday 06 April 2006 10: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 ????

Friday 07 April 2006 8:21:26 am

These topics will help you:

http://ez.no/community/forum/developer/image_link_question
http://ez.no/community/forum/deve..._content_in_an_ezselection_attribute
http://ez.no/community/forum/setu...lter_content_passing_values_from_url
http://ez.no/community/forum/deve...ore_values_from_a_selection_multiple

Tuesday 22 February 2011 5:47:23 pm

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) ?

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from