View Single Post
  #1 (permalink)  
Old Nov 7th, 2007, 09:22
eon201 eon201 is offline
Up'n'Coming Member
Join Date: Oct 2007
Location: london
Age: 25
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation [SOLVED] saving data from one array into another

Hi im trying to output some data from one array that has been looped through into another so i can do some further calculations. But I dont know which function to use... Can anyone help??

PHP: Select all

                // calculate all page requests
                
$all_request count($log_request); // calculate all page counts value
                
                //calculate dirty page counts

            
                
foreach ($log_request as $temp)
                {
                
$last substr($temp, -33);
                    if (
$last == "gif|| $last == "jpg" || $last == "txt" || $last == "swf|| $last == "png|| $last == "css|| $last == "/^.js/" || $last == "ico"){
                        echo 
"i have found bad data $temp<br/>";// need to save this out to $badrequest
                        
}
                    else {
                            echo 
" i have NOT found bad data $temp<br/>";
                            }
                                        
                }
                
// calculate actual page count value
                //$good_request = $all_request - $bad_request;
                
                //echo "$good_request"; 
Thanks in advance!
Reply With Quote