I have a set of property names, and its possible values, taken from database.I want to perform some array manipulation, so I get all possible values of the property in an array.
So the code would be something like:
$associative_array[$row->PropertyName][] = $row->value;
The problem is that I am not too confident that this may work in other encodings rather than the default, and I have problems with sort
to start with, having to set the locale.
Is it a good approach or should I have something like this:
$properties_array[ $row->PropertyId][] = $row->value;
where I am using the numeric and unique PropertyId, and I will take the properyName in another way, for example, like this:
$properties_array[ $row->PropertyId][] = array($row->PropertyName, $row->value);