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); } Quote 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); Quote Link to comment https://forums.phpfreaks.com/topic/62992-files/#findComment-313694 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.