php - Getting a subset efficiently when non-seekable -
I have a fairly large array, which I have structured: I am trying to find a more efficient way A subset of this array / piece I am currently doing:
$ valToken = $ attr size [$ array- & gt; Shape]; // 14 $ size name = []; Forex Currency ($ ARR AS $ Key => $ value) {if ($ valToken === $ value) {$ sizeNames [] = $ key; } If ($ valToken & lt; $ value) break; } However in my opinion, looping should not be answered because it is quite disabled although I have not, to ensure that I do not run a full loop, if < Add a section to break the class after the / <<> less than $ value , however a clever, more efficient way of doing this with all array methods available in PHP should be there?
Try:
$ sizename = array_keys ($ attr size , $ Array- & gt; shape, true); Anyway: I structure the array like this: $ attrSizes = [0 = & gt; ['*' No,], 1 = & gt; ['Xs (101)', 'S (102)', 'M (103)', 'L (104)', 'XL (105)', 'XXL (106)', 'XXXL (107)' ,], 2 = & gt; ['Small x 31 (110)' 'Small x 33 (111)', ...], ...];
Comments
Post a Comment