Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for($i=2011; $i<=(int)date('Y'); $i++)
- {
- $year_list[] = $i;
- }
- $n = count($year_list)-1;
- $javascript2 = 'onchange="document.adminForm.submit();"';
- $attribs = 'class="inputbox" size="1" '. $javascript2;
- //$options[] = JHTML::_( 'select.option', '', JText::_( 'AUP_SELECTYEAR' ) );
- for ($i=0, $n=(count( $year_list )-1); $i <= $n; $i++) {
- $options[] = JHTML::_( 'select.option', $year_list[$i], $year_list[$i] );
- }
- some notes:
- the first $n = is overriden
- wtf is that $n = assign inside the foor loop
- why not just assign the $options[] inside the first for loop instead of creating year_list .
Add Comment
Please, Sign In to add comment