Page 1 of 1

how

Posted: Mon Nov 24, 2014 9:38 am
by Maanu
Hi,

Re: PHP - how to compare and eliminate repeated data set of

Posted: Mon Nov 24, 2014 11:48 am
by PHPHelpNeeded
You need to be more specific.

For instance

the group of numbers you gave, are they an array of arrays?

Code: Select all

<?php
    $myarray = array(array(4,4,5,6,5 4,4,5,5,6), array(4,4,5,7,5 4,4,5,5,7), array(4,4,5,7,6 4,4,5,6,7), array(4,4,6,5,5 4,4,5,5,6));
?>
The other question is, are you talking about removing the repeat data HORIZONTALLY or VERTICALLY?

If it is vertical, the 44 at the begin of each group, can be removed just fine.

But if you are looking for repeat numbers horizontally, all numbers will be gone.

That's if I understand what you are asking for.


Clarifying this will help us help you...

Re: PHP - how to compare and eliminate repeated data set of

Posted: Mon Nov 24, 2014 12:40 pm
by Celauran
Maanu wrote:Kindly send me the function details to execute it without repetition.
sort()?

how to compare

Posted: Mon Nov 24, 2014 9:09 pm
by Maanu
Thanks

Re: PHP - how to compare and eliminate repeated data set of

Posted: Mon Nov 24, 2014 9:11 pm
by Celauran
And if you placed the results in a new array, and checked for the presence with in_array()?