Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

String comparsion script/algorithm

String comparsion script/algorithm

2:03 pm on Jul 17, 2009 (gmt 0)

5+ Year Member


I have thousands products and would like to do some price komparsion between the same products
Looking for a solution which would compare these products/titles and point which of them are the same.

For example I have these two, they are the same but with different titles:

$title2= "SENCOR SDV 7112 SUPER SLIM DIVX 5.1";
$title3= "DVD player SENCOR SDV 7112";

I've tried array_intersect() but this is not giving me the right results, it is jus approx solution.

Is there any method/algorithm for this?

Thank you!

6:09 pm on Jul 17, 2009 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member

What do you mean the same? They have the same price? Can you post more code and an example of where you would want to to return true and two to return false? I could help you more with that.
7:03 pm on Jul 17, 2009 (gmt 0)

10+ Year Member

check similar_text()
7:19 pm on Jul 17, 2009 (gmt 0)

5+ Year Member

Saying that they are the same,I meant the products are the same bud with slightly different name, and I need to look up all the same products even if they have little bit different name, and comapare their prices.

For instance, you have 10 products in catalog from different stores (e-shops) which are the same but with little different names, as here:

$title2= "SENCOR SDV 7112 SUPER SLIM DIVX 5.1";
$title3= "DVD player SENCOR SDV 7112";

...and what I'm trying to do is pull out all the potential product which may be the same although they have slightly different names, and compare their prices.

I have some solution, which is giving me the % of similarity, but just wondering if there could be something more precise, any algorithm

Thank you!


Featured Threads

Hot Threads This Week

Hot Threads This Month