I have a list:
Here is a code:
$main_content .= '<div class="InnerTableContainer" >
<table style="width:100%;" >
<tr>';
if(count($config['site']['newchar_vocations']$world_id]) > 1) {
$main_content .= '<td><table class="TableContent" width="100%" >
<tr class="Odd" valign="top">
<td width="160"><br /><b>Select your vocation:</b></td>
<td><table class="TableContent" width="100%" >';
foreach($config['site']['newchar_vocations'][$world_id] as $char_vocation_key => $sample_char) {
$main_content .= '<tr><td><input type="radio" name="newcharvocation" value="'.$char_vocation_key.'" ';
if($newchar_vocation == $char_vocation_key)
$main_content .= 'checked="checked" ';
$main_content .= '>'.htmlspecialchars($vocation_name[0][$char_vocation_key]).'</td></tr>';
}
$main_content .= '</table></table></td>';
It's taking the names to the list from this config:
$config['site']['newchar_vocations'][0] = array(
1 => 'Goku Sample',
17 => 'Vegeta Sample',
32 => 'Piccolo Sample',
45 => 'C17 Sample',
57 => 'Gohan Sample',
71 => 'Trunks Sample',
83 => 'Cell Sample',
95 => 'Freeza Sample',
111 => 'Majin Boo Sample',
140 => 'C18 Sample',
206 => 'Dende Sample',
244 => 'Kuririn Sample',
256 => 'Pan Sample',
292 => 'Janemba Sample',
304 => 'Tenshinhan Sample',
280 => 'Videl Sample',
316 => 'Jenk Sample',
192 => 'Cooler Sample',
328 => 'Raditz Sample',
340 => 'C16 Sample',
352 => 'Turles Sample',
364 => 'Bulma Sample',
230 => 'Bardock Sample',
268 => 'Kaio Sample',
178 => 'Chibi Trunks Sample',
152 => 'Uub Sample'
);
How to divide this list to for example 3 parts? For example 6 values per part? Like this:
';
}
$main_content .= '
';` And nothing changed – dawidurusek Feb 27 '17 at 10:55