how

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Maanu
Forum Newbie
Posts: 2
Joined: Mon Nov 24, 2014 9:35 am

how

Post by Maanu »

Hi,
Last edited by Maanu on Tue Nov 25, 2014 1:06 am, edited 2 times in total.
PHPHelpNeeded
Forum Commoner
Posts: 83
Joined: Mon Nov 17, 2014 8:03 pm

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

Post 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...
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

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

Post by Celauran »

Maanu wrote:Kindly send me the function details to execute it without repetition.
sort()?
Maanu
Forum Newbie
Posts: 2
Joined: Mon Nov 24, 2014 9:35 am

how to compare

Post by Maanu »

Thanks
Last edited by Maanu on Tue Nov 25, 2014 1:01 am, edited 1 time in total.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

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

Post by Celauran »

And if you placed the results in a new array, and checked for the presence with in_array()?
Post Reply