View Single Post
  #24 (permalink)  
Old 06-25-08, 09:52 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,515
Thanks: 20
Thanked 109 Times in 106 Posts
This loop

PHP Code:

for($i=0;$i<count($this->Orders);$i++) {

          
$this->Orders[$i][0] = "";
          
$this->Orders[$i][1] = "";
       } 
could be written like so:

PHP Code:

j=count($this->Orders);  // Evaluated once

for (i=0;i<j;i++)
  unset(
$this->Orders[$i]); 
Both approaches are valid and equivalent.
Reply With Quote