PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php function reduce2(&$narr){ $startA= $narr; $keys = array_keys($narr); foreach($keys as $nk){ if( sizeof($narr[$nk]) == 10 ){ $narr[substr($nk,0,-1)][]=$nk; unset($narr[$nk]); } } if($startA != $narr){ reduce2($narr); } } $data =array( array('start'=>'3728729990000','end'=>'3728729999999','op'=>'TISMI?','code'=>''), array('start'=>'37255000000','end'=>'37255999999','op'=>'TELE2','code'=>'MNO'), array('start'=>'37258000000','end'=>'37258899999','op'=>'TELE2','code'=>'MNO'), array('start'=>'37258900000','end'=>'37258909999','op'=>'TELE2','code'=>'MNO'), array('start'=>'37259120000','end'=>'37259121999','op'=>'TELE2','code'=>'MNO'), array('start'=>'37259140000','end'=>'37259141399','op'=>'TELE2','code'=>'MNO'), array('start'=>'37259144400','end'=>'37259144999','op'=>'TELE2','code'=>'MNO'), array('start'=>'37281102000','end'=>'37281106999','op'=>'TELE2','code'=>'MNO'), array('start'=>'37281750000','end'=>'37281759999','op'=>'TELE2','code'=>'MNO'), array('start'=>'37281760000','end'=>'37281769999','op'=>'TELE2','code'=>'MNO'), array('start'=>'37282030000','end'=>'37282039999','op'=>'TELE2','code'=>'MNO'), array('start'=>'37282040000','end'=>'37282049999','op'=>'TELE2','code'=>'MNO'), array('start'=>'37282056000','end'=>'37282075999','op'=>'TELE2','code'=>'MNO'), array('start'=>'37282160000','end'=>'37282189999','op'=>'TELE2','code'=>'MNO'), array('start'=>'37282199000','end'=>'37282199999','op'=>'TELE2','code'=>'MNO'), array('start'=>'37282730000','end'=>'37282739999','op'=>'TELE2','code'=>'MNO'), array('start'=>'37282842000','end'=>'37282871999','op'=>'TELE2','code'=>'MNO'), array('start'=>'37282921000','end'=>'37282930999','op'=>'TELE2','code'=>'MNO'), array('start'=>'37283000000','end'=>'37283999999','op'=>'TELE2','code'=>'MNO'), array('start'=>'37284000000','end'=>'37284509999','op'=>'TELE2','code'=>'MNO'), array('start'=>'37284513000','end'=>'37284999999','op'=>'TELE2','code'=>'MNO'), array('start'=>'372870000600000','end'=>'372870000699999','op'=>'TELE2','code'=>'MNO'), array('start'=>'372870007000000','end'=>'372870007999999','op'=>'TELE2','code'=>'MNO'), array('start'=>'37254505100','end'=>'37254508099','op'=>'ELISA','code'=>'MNO'), array('start'=>'37254509000','end'=>'37254509999','op'=>'ELISA','code'=>'MNO'), array('start'=>'37254560000','end'=>'37254599999','op'=>'ELISA','code'=>'MNO'), array('start'=>'37254610000','end'=>'37254634000','op'=>'ELISA','code'=>'MNO'), array('start'=>'37254637000','end'=>'37254639999','op'=>'ELISA','code'=>'MNO'), array('start'=>'37254664000','end'=>'37254665999','op'=>'ELISA','code'=>'MNO'), array('start'=>'37254667000','end'=>'37254669999','op'=>'ELISA','code'=>'MNO'), array('start'=>'37256000000','end'=>'37256002299','op'=>'ELISA','code'=>'MNO'), array('start'=>'37256002400','end'=>'37256999999','op'=>'ELISA','code'=>'MNO'), array('start'=>'37258910000','end'=>'37258999999','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282019001','end'=>'37282029028','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282050001','end'=>'37282055999','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282100004','end'=>'37282121021','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282121022','end'=>'37282136025','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282136026','end'=>'37282141027','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282141328','end'=>'37282146327','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282146328','end'=>'37282155999','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282156000','end'=>'37282159901','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282190000','end'=>'37282198999','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282201000','end'=>'37282210005','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282210006','end'=>'37282219999','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282220001','end'=>'37282222199','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282222300','end'=>'37282229999','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282230000','end'=>'37282260007','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282260008','end'=>'37282260837','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282260838','end'=>'37282265837','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282265848','end'=>'37282270849','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282270870','end'=>'37282280881','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282280882','end'=>'37282286890','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282286891','end'=>'37282291897','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282291898','end'=>'37282296898','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282296899','end'=>'37282299998','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282350000','end'=>'37282359999','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282360000','end'=>'37282369999','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282370000','end'=>'37282399999','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282400000','end'=>'37282429999','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282430000','end'=>'37282449999','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282450000','end'=>'37282469999','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282470000','end'=>'37282499999','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282543000','end'=>'37282548005','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282550056','end'=>'37282555632','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282555956','end'=>'37282580971','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282580972','end'=>'37282590978','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282590979','end'=>'37282595980','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282600003','end'=>'37282699998','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282760000','end'=>'37282781999','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282783000','end'=>'37282799998','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282838889','end'=>'37282841999','op'=>'ELISA','code'=>'MNO'), array('start'=>'37281230000','end'=>'37281239999','op'=>'ELISA','code'=>'MNO'), array('start'=>'372870009000000','end'=>'372870009999999','op'=>'ELISA','code'=>'MNO'), array('start'=>'372871000000000','end'=>'372871001499999','op'=>'ELISA','code'=>'MNO'), array('start'=>'37282740000','end'=>'37282759999','op'=>'ELISA','code'=>'MNO'), array('start'=>'3725000000','end'=>'3725099999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37251000000','end'=>'37251999999','op'=>'TELIA','code'=>'MNO'), array('start'=>'3725200000','end'=>'3725299999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253000000','end'=>'37253007050','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253007054','end'=>'37253008991','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253008993','end'=>'37253020925','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253020928','end'=>'37253024101','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253024106','end'=>'37253100031','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253100165','end'=>'37253100184','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253100200','end'=>'37253100222','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253101500','end'=>'37253101549','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253101601','end'=>'37253101949','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253128997','end'=>'37253129396','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253145238','end'=>'37253145537','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253152647','end'=>'37253152946','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253153778','end'=>'37253154177','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253154446','end'=>'37253154945','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253157170','end'=>'37253157469','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253158146','end'=>'37253158645','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253159648','end'=>'37253160795','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253162669','end'=>'37253162968','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253200001','end'=>'37253200070','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253218021','end'=>'37253218320','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253225000','end'=>'37253226999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253229004','end'=>'37253250000','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253264001','end'=>'37253264997','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253267000','end'=>'37253269997','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253284001','end'=>'37253285999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253292000','end'=>'37253293499','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253300001','end'=>'37253309852','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253309901','end'=>'37253335999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253337000','end'=>'37253341999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253345000','end'=>'37253345999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253354355','end'=>'37253354754','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253358000','end'=>'37253359999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253360549','end'=>'37253360948','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253363001','end'=>'37253367499','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253367740','end'=>'37253368039','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253368320','end'=>'37253368620','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253370253','end'=>'37253370652','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253375665','end'=>'37253375964','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253379185','end'=>'37253379484','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253380556','end'=>'37253380755','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253382842','end'=>'37253383241','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253385336','end'=>'37253385835','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253393084','end'=>'37253393483','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253396875','end'=>'37253397274','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253399999','end'=>'37253685825','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253689250','end'=>'37253689649','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253692472','end'=>'37253692971','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253693310','end'=>'37253694209','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253694659','end'=>'37253695058','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253695288','end'=>'37253696297','op'=>'TELIA','code'=>'MNO'), array('start'=>'37253700000','end'=>'37253999999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254000000','end'=>'37254139999','op'=>'TELIA','code'=>'MNO'), array('start'=>'3725460000','end'=>'3725460999','op'=>'TELIA','code'=>'MNO'), array('start'=>'3725470001','end'=>'3725470998','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254141250','end'=>'37254141750','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254142000','end'=>'37254142099','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254143100','end'=>'37254143999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254145000','end'=>'37254145999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254147000','end'=>'37254147499','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254148082','end'=>'37254148581','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254153697','end'=>'37254155087','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254171716','end'=>'37254171718','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254173000','end'=>'37254176999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254200002','end'=>'37254200999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254210000','end'=>'37254210999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254212120','end'=>'37254212122','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254220001','end'=>'37254220999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254222221','end'=>'37254222254','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254230000','end'=>'37254230999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254240001','end'=>'37254240999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254250001','end'=>'37254250999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254260000','end'=>'37254260998','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254270001','end'=>'37254270999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254280000','end'=>'37254280999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254290000','end'=>'37254290999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254291581','end'=>'37254292080','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254292435','end'=>'37254292834','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254294000','end'=>'37254294399','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254300001','end'=>'37254301999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254310001','end'=>'37254310999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254320004','end'=>'37254321001','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254330001','end'=>'37254330999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254340003','end'=>'37254340999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254343857','end'=>'37254344356','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254345000','end'=>'37254345999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254350000','end'=>'37254350998','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254360000','end'=>'37254360999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254370000','end'=>'37254370999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254380000','end'=>'37254380999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254390001','end'=>'37254390999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254400003','end'=>'37254400996','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254410001','end'=>'37254410999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254420000','end'=>'37254420999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254430000','end'=>'37254430999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254440003','end'=>'37254440998','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254450001','end'=>'37254450999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254460003','end'=>'37254460999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254470001','end'=>'37254470999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254480003','end'=>'37254480999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254490001','end'=>'37254490998','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254500000','end'=>'37254502999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254510000','end'=>'37254559999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254600000','end'=>'37254609999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254640000','end'=>'37254640996','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254650000','end'=>'37254650994','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254652530','end'=>'37254652929','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254660000','end'=>'37254660998','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254666000','end'=>'37254666999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254670000','end'=>'37254670998','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254680000','end'=>'37254680499','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254680600','end'=>'37254680998','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254690003','end'=>'37254690999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254700000','end'=>'37254700999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254709155','end'=>'37254709554','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254710001','end'=>'37254710999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254720000','end'=>'37254720999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254730000','end'=>'37254730999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254731265','end'=>'37254731764','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254732150','end'=>'37254732649','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254740002','end'=>'37254741004','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254750001','end'=>'37254750999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254780000','end'=>'37254780999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254790001','end'=>'37254790998','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254800002','end'=>'37254800999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254810001','end'=>'37254810999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254820002','end'=>'37254820999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254824428','end'=>'37254824827','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254830000','end'=>'37254830998','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254835050','end'=>'37254835449','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254840001','end'=>'37254840998','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254850002','end'=>'37254850998','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254860000','end'=>'37254860996','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254887363','end'=>'37254887862','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254922802','end'=>'37254924242','op'=>'TELIA','code'=>'MNO'), array('start'=>'37254924874','end'=>'37254925273','op'=>'TELIA','code'=>'MNO'), array('start'=>'37257000000','end'=>'37257140699','op'=>'TELIA','code'=>'MNO'), array('start'=>'37257140800','end'=>'37257599999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37257600100','end'=>'37257881599','op'=>'TELIA','code'=>'MNO'), array('start'=>'37257881700','end'=>'37257999999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37259000000','end'=>'37259119999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37259122000','end'=>'37259129999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37259130000','end'=>'37259139999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37259141400','end'=>'37259144399','op'=>'TELIA','code'=>'MNO'), array('start'=>'37259145000','end'=>'37259199999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37259200000','end'=>'37259203799','op'=>'TELIA','code'=>'MNO'), array('start'=>'37259203900','end'=>'37259301299','op'=>'TELIA','code'=>'MNO'), array('start'=>'37259301400','end'=>'37259999999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37281000000','end'=>'37281000099','op'=>'TELIA','code'=>'MNO'), array('start'=>'37281001549','end'=>'37281001998','op'=>'TELIA','code'=>'MNO'), array('start'=>'37281007300','end'=>'37281007460','op'=>'TELIA','code'=>'MNO'), array('start'=>'37281007470','end'=>'37281007492','op'=>'TELIA','code'=>'MNO'), array('start'=>'37281007500','end'=>'37281007547','op'=>'TELIA','code'=>'MNO'), array('start'=>'37281008188','end'=>'37281008219','op'=>'TELIA','code'=>'MNO'), array('start'=>'37281030000','end'=>'37281099999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37281110000','end'=>'37281119999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37281200000','end'=>'37281200999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37281203000','end'=>'37281203099','op'=>'TELIA','code'=>'MNO'), array('start'=>'37281211110','end'=>'37281212199','op'=>'TELIA','code'=>'MNO'), array('start'=>'37281221220','end'=>'37281221299','op'=>'TELIA','code'=>'MNO'), array('start'=>'37281222200','end'=>'37281222229','op'=>'TELIA','code'=>'MNO'), array('start'=>'37281222320','end'=>'37281229229','op'=>'TELIA','code'=>'MNO'), array('start'=>'37281244400','end'=>'37281244499','op'=>'TELIA','code'=>'MNO'), array('start'=>'37281255500','end'=>'37281255599','op'=>'TELIA','code'=>'MNO'), array('start'=>'37281299990','end'=>'37281299999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37281900000','end'=>'37281900099','op'=>'TELIA','code'=>'MNO'), array('start'=>'37281900200','end'=>'37281999999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37282000000','end'=>'37282000099','op'=>'TELIA','code'=>'MNO'), array('start'=>'37282700000','end'=>'37282729999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37282820000','end'=>'37282820999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37282822000','end'=>'37282822999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37282828000','end'=>'37282828999','op'=>'TELIA','code'=>'MNO'), array('start'=>'37284510000','end'=>'37284512999','op'=>'TELIA','code'=>'MNO'), array('start'=>'372870000000000','end'=>'372870000004999','op'=>'TELIA','code'=>'MNO'), array('start'=>'372870000005001','end'=>'372870000032000','op'=>'TELIA','code'=>'MNO'), array('start'=>'3584097097GT','end'=>'3584097097TELIA','op'=>'','code'=>''), array('start'=>'358405202345GT','end'=>'358405202345TELIA','op'=>'','code'=>''), ); foreach($data as $r){ $strt = $r['start']; $end = $r['end']; if( strlen($strt) == strlen($end) ){ for($i=0;$i < (strlen($strt) -1);$i++){ if( substr($strt, -1)=='0' && substr($end, -1)=='9'){ $strt=substr($strt,0, -1); $end=substr($end,0, -1); } } } $d=$strt*1; $match=array(); while( $d <= ($end *1) ){ $match[substr(' '.$d,0,-1)][]= ''.$d; $d++; } reduce2($match); foreach($match as $range){ foreach($range as $vals){ echo trim($vals)."\t".$r['op']."\t".$r['code']."\n"; } } } ?>
Show:  
Copy Clear