« first day (75 days earlier)      last day (1288 days later) » 

3 messages moved from To be closed...
 
TrackerBot started on Desktop-Kamil
TrackerBot started on Desktop-Kamil
TrackerBot started on Desktop-Kamil
TrackerBot started on Desktop-Kamil
TrackerBot started on Desktop-Kamil
TrackerBot started on dharman
TrackerBot started on Desktop-Kamil
TrackerBot started on Desktop-Kamil
TrackerBot started on Desktop-Kamil
TrackerBot started on Desktop-Kamil
TrackerBot started on Desktop-Kamil
TrackerBot started on Desktop-Kamil
TrackerBot started on Desktop-Kamil
TrackerBot started on Desktop-Kamil
TrackerBot started on dharman
TrackerBot started on dharman
TrackerBot started on Desktop-Kamil
TrackerBot started on dharman
 
 
3 hours later…
 
2 hours later…
11:04 AM
0
A: How to sum array value of duplicate data

Manish@Cloud Try this. $array = array(array("ID" => "126871","total"=>"200.00","currency"=>"USD","name"=>"John",),array("ID" => "126871","total"=>"200.00","currency"=>"USD","name"=>"John",),array("ID" => "126872","total"=>"1000.00","currency"=>"Euro","name"=>"John",)); echo "<pre>"; print_r(...

 
11:55 AM
-1
A: Sorting by Regex Groups in PHP

mickmackusaAfter breaking your strings into their meaningful parts, I feel a cascading set of ternary expressions to be a bit tidier than if blocks to reach subsequent tie-breaking conditions. Also, using version_compare() is VERY appropriate for your middle substring -- this will ensure that when your maj...

 
12:25 PM
@mickmackusa I don't know who downvoted it or why, but I do not feel strong enough about it to upvote it back. I prefer mostly downvoting stuff and I reserve my upvotes for answers which I truly believe will have a positive effect. In this case I would vote the question as "needs more focus" when it was asked, but now when it has answers my feeling about it is "meh"
 
@Dharman why does it need more focus? It has a clear mcve and show an attempt to parse for grouping. What else do you feel it needs?
 
@mick Why is regex involved? The different comparisons should ideally be in separate questions. Maybe it is just my opinion but I think the question is too localized. It's difficult to single out a clear problem statement. Is it searching? Splitting using regex? Conparison?
If there was an attempt by OP at least we would know what to focus on.
 
1:11 PM
The title is rather declarative. The OP is parsing the strings (breaking them into meaningful parts), then executing multiple sorting rules for the new desired order. I am not sure where this is foggy for you.
Granted, it looks like the regex is not 100% correct.
 
But the sortng rules are pretty well defined. The OP has shown what they tried and is open to hearing new/different sorting techniques/algorithms.
As I demonstrated in my answer, regex is not necessary.
 
As I said, to me this is not a high-quality question. I choose to do nothing about it. I don't want to argue or change anything, I simply expressed my opinion.
It has been over 8 years and the question has only 1400 views. I doubt that many people have similar issues with sorting by regex. If they do then your answer should help them, but Toto's answer looks good to me too.
 
1:29 PM
Personally, my fight is with misinformation and noise. I do not care about mediocre questions too much. There are millions of questions and I do not have time or enough votes to review all of them. I highly value your contributions though, because you do help with questions and topics I avoid. Keep your answer and it might help someone someday. Don't be discouraged by a single vote someone cast on your post.
 
 
2 hours later…
4:11 PM
TrackerBot started on dharman
TrackerBot started on Desktop-Kamil
TrackerBot started on Desktop-Kamil
TrackerBot started on Desktop-Kamil
TrackerBot started on Desktop-Kamil
 

« first day (75 days earlier)      last day (1288 days later) »