I have a table of such values:
and I want to declare these values in a php class and then to manipulate them easily.
In your opinion, what is the best way to do this?
You can create an indexed array by country name and then by size number: But to avoid mistakes and to make the code more readable, I would label each type of type then I would be an array indicator before the size size , and then the country: This is more difficult to make another way, but seems more natural to me (what's the size in the UK?) Anyway, this is your choice according to your choice Is;)
$ size = array ('S' = & gt; array (combined Ajy US) '= & Gt; 6,' United Kingdom '= & gt; 28, ...),' M '= & gt; Array ('United States' => 8, 'United Kingdom' => 30, ...), ...);
Comments
Post a Comment