Changeset 4376

Show
Ignore:
Timestamp:
01/10/08 22:22:12 (5 years ago)
Author:
tasuku
Message:

lang/php/mumu: use foreach in MuForNode?

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/php/mumu/trunk/mumu.php

    r4374 r4376  
    569569    $len_values = count($values); 
    570570    $rnodelist = array(); 
    571     for ($i = 0; $i < $len_values; $i++) { 
     571    $i = 0; 
     572    foreach ($values as $val) { 
    572573      $context->set('forloop', array( 
    573574        'counter0' => $i, 
     
    579580        'parentloop' => $parentloop 
    580581      )); 
    581       $context->set($this->loopvar, $values[$i]); 
     582      $context->set($this->loopvar, $val); 
    582583      $rnodelist[] = $this->nodelist_loop->_render($context); 
     584      $i++; 
    583585    } 
    584586    $context->pop();