print_r($item->jcfields);
Array
(
[1] => stdClass Object
(
[id] => 1
[title] => Specialisms
[name] => specialisms
[checked_out] => 0
[checked_out_time] => 0000-00-00 00:00:00
[note] =>
[state] => 1
[access] => 1
[created_time] => 2018-06-16 18:01:45
[created_user_id] => 903
[ordering] => 0
[language] => *
[fieldparams] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[multiple] => 1
[options] => stdClass Object
(
[options0] => stdClass Object
(
[name] => General Personal Training
[value] => General Personal Training
)
[options1] => stdClass Object
(
[name] => Conditioning
[value] => Conditioning
)
[options2] => stdClass Object
(
[name] => Strength
[value] => Strength
)
[options3] => stdClass Object
(
[name] => Boxing
[value] => Boxing
)
[options4] => stdClass Object
(
[name] => Rugby
[value] => Rugby
)
[options5] => stdClass Object
(
[name] => Football
[value] => Football
)
[options6] => stdClass Object
(
[name] => High Intensity Training (HIT)
[value] => High Intensity Training (HIT)
)
[options7] => stdClass Object
(
[name] => Long Distance Running
[value] => Long Distance Running
)
[options8] => stdClass Object
(
[name] => Athletics
[value] => Athletics
)
)
)
[initialized:protected] => 1
[separator] => .
)
[params] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[render_class] =>
[class] =>
[showlabel] => 1
[show_on] =>
[display] => 0
[display_readonly] => 2
)
[initialized:protected] => 1
[separator] => .
)
[type] => list
[default_value] =>
[context] => com_contact.contact
[group_id] => 0
[label] => Specialisms
[description] =>
[required] => 0
[language_title] =>
[language_image] =>
[editor] =>
[access_level] => Public
[author_name] => Eoin
[group_title] =>
[group_access] =>
[group_state] =>
[value] => General Personal Training, Conditioning, Strength, Boxing, Athletics
[rawvalue] => Array
(
[0] => General Personal Training
[1] => Conditioning
[2] => Strength
[3] => Boxing
[4] => Athletics
)
)
)
I can output the value by using
foreach ($item->jcfields as $field) {
echo $field->value;
}
But how can I output the options
1 by 1. Then I can style individual items