sandy1028 Posted August 2, 2007 Share Posted August 2, 2007 Hi, I want to sort the $text_line[0] and $text_line[1] separately.. When I use sort($lines) $text_line[1] also gets altered... Please help me with this $lines = file('phonedb.txt'); foreach($lines as $line) { $text_line=explode(":",$line); } Link to comment https://forums.phpfreaks.com/topic/62992-files/ Share on other sites More sharing options...
clearstatcache Posted August 2, 2007 Share Posted August 2, 2007 not sure if i get u ryt... $lines = file('phonedb.txt'); $line1 = array(); $line2 = array(); foreach($lines as $line) { $text_line=explode(":",$line); $line1[] = $text_line[0]; $line2[] = $text_line[1]; } sort($line1); sort($line2); Link to comment https://forums.phpfreaks.com/topic/62992-files/#findComment-313694 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.