<?php
	$accordion_list = '';

	foreach($instance['accordion'] as $item) {
		$accordion_list .= '[accordion_item title="' . $item['title'] . '" opened="' . $item['opened'] . '"]' . do_shortcode($item['text']) . '[/accordion_item]';
	}
	
	echo do_shortcode('[accordion]' . $accordion_list . '[/accordion]');
?>