View Single Post
Old 11-26-2008, 04:51 PM   #8 (permalink)
tony
The Addict
 
tony's Avatar
 
Join Date: Aug 2008
Posts: 336
Thanks: 8
tony is on a distinguished road
Default

I ran the code:

PHP Code:
<?php
$file 
array_reversefile'u4g.txt' ) );
foreach ( 
$file as $line ){
    
$parts explode('||'$line);
    echo 
$parts[0].'||'.$parts[1].'||'.$parts[2].'||'.$parts[3].'<br />';
}
?>
with this dummy text file:

Code:
data1||email1||name1||description1
data2||email2||name2||description2
data3||email3||name3||description3
data4||email4||name4||description4
data5||email5||name5||description5
data6||email6||name6||description6
and my output was this:

Code:
data6||email6||name6||description6
data5||email5||name5||description5
data4||email4||name4||description4
data3||email3||name3||description3
data2||email2||name2||description2
data1||email1||name1||description1
are you sure there is not something else that is conflicting with the code? maybe the variable $path is used somewhere else, or your file function is not supported in your php installation (I don't think that might be the case, but still), or maybe your file is protected?

It's been a while since I worked with files
tony is offline  
Reply With Quote
The Following User Says Thank You to tony For This Useful Post:
buildakicker (11-26-2008)