if i have a mysql query that returns some values, these values are categorized by ‘parent_id’ there are roughly 3-5 values pr ‘parent_id’. In my while loop, I only want to echo the first value from each ‘parent_id’. How do i go about this?
something like “if this is the first time this variable has this value do stuff”
Just add the conditional to your while loop …