Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Jul 11th, 2018 59 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. for($i=2011; $i<=(int)date('Y'); $i++)
  2. {
  3.     $year_list[] = $i;
  4. }
  5.  
  6. $n = count($year_list)-1;
  7.  
  8. $javascript2 = 'onchange="document.adminForm.submit();"';
  9. $attribs = 'class="inputbox" size="1" '. $javascript2;
  10.  
  11. //$options[] = JHTML::_( 'select.option', '', JText::_( 'AUP_SELECTYEAR' ) );
  12.  
  13. for ($i=0, $n=(count( $year_list )-1); $i <= $n; $i++) {
  14.     $options[] = JHTML::_( 'select.option', $year_list[$i], $year_list[$i] );
  15. }
  16.  
  17.  
  18. some notes:
  19. the first $n = is overriden
  20. wtf is that $n = assign inside the foor loop
  21.  
  22. why not just assign the $options[] inside the first for loop instead of creating year_list .
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top