|
|
|
|
|
|
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
![]() |
#5 |
a.k.a. Sparky
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
|
upload the following and your file to be converted as filename.txt:
Code:
<?php $contents = file_get_contents("filename.txt"); $line_by_line = explode("\n", $contents); array_pop($line_by_line); // get rid of the empty line at the end that explode creates $results = array(); foreach ($line_by_line as $line) { list ($url, $title, $description) = explode("|", $line); print "$title|$url|$description\n"; } ?> alternatively if you have ssh access, you could do: Code:
awk < filename.txt -F\| '{ print $2 "|" $1 "|" $3 }' > outfile.txt
__________________
SnapReplay.com a different way to share photos - iPhone & Android |
![]() |
![]() |
|
|