finding similar items in an array

From: Date: Wed, 16 Apr 2003 01:19:38 +0000
Subject: finding similar items in an array
Groups: php.general 
Request: Send a blank email to php-general+get-144049@lists.php.net to get a copy of this message
hi guys , i have a trikky task of migrating data from an access database into mysql, although the entries in the fields are not standard, therefore is was tonnes of ways someone entered a program , username etc .. the way i usually work is split up the data into table for instance programs go into a programs table , reporter goes into a reporter table etc .. , the tricky task is , i have to find the text entry when doing the conversion from a csv file and get the corresponding primary key from say the programs table and then insert the id into the main table rather than storing the program as freetext into the main table , this is how i work i usually join tables with keys , is this the right way about it ? rather than storing this as freetext, anyway , while extracting and importing the csv, i basically need to find a similar match of the program against program names stored in an array, although i dont think in_array will help as it wants exact matches , would preg_match with the match as an array work ? let me know thanks

« previous php.general (#144049) next »