kbjradmin
New Member
- Messages
- 512
- Reaction score
- 2
- Points
- 0
i am writing a script that will make someone able to easily created an html format resume; so i have blocks that represent different parts of a resume and you just piece it together. i'm making a block to create a one or two column list (depending on the length) of items. for some reason, its not working.
here's the code:
please help.
here's the code:
PHP:
// sets two column list for resume
function resumeList($items){
$minItems = 4; # any list containing this many or less items will be one column
if ( count($items) <= $minItems ){
$code = '<div class="itemlist">';
for ($i = 1, $i <= count($items)-1, $i++){
$code = $code.'<p>'.$items[$i].'</p>'."\n";
}
$code = $code.'</div>';
}
else{
$numItemsHalf = count($items) / 2;
$code1 = '<div class="itemlist">';
for ($i = 1, $i <= $numItemsHalf-1, $i++){
$code1 = $code1.'<p>'.$items[$i].'</p>'."\n";
}
$code1 = $code1.'</div>';
}
$code2 = '<div class="itemlist">';
for ($i = $numItemsHalf, $i <= count($items)-1, $i++){
$code2 = $code2.'<p>'.$items[$i].'</p>'."\n";
}
$code2 = $code2.'</div>';
}
$code = $code1."\n".$code2;
}
return $code;
}
please help.