benphp Posted April 27, 2008 Share Posted April 27, 2008 Is there a way to do this - or do you have to use regular expressions to filter out results? Quote Link to comment Share on other sites More sharing options...
mrdamien Posted April 27, 2008 Share Posted April 27, 2008 Well, you can 'query' a CSV file per se, but you can find it with regular expressions, or simply by going through each line. $file = file('csv.txt'); foreach($file as $line){ list($id, $name, $addess) = explode(",", $line); if($id == 123){ } } Quote Link to comment Share on other sites More sharing options...
benphp Posted April 27, 2008 Author Share Posted April 27, 2008 Thanks - I'll use that. Looks like it will boil down to regular expressions. I must get better at them. Quote Link to comment 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.