In order to get the unique values from an array , there are many ways, through using Set , or filter() method on array values or other methods.
Sometimes you have a multi-dimensional array and you only need the unique arrays in it. here is a simple solution using pure php function
In this snippet I will teach you how to create unique validation related to another column