if statement - PHP check phone prefixes -
the code kinda big want avoid posting here.
http://codepad.org/arzh7ya9
trying load bunch of numbers array. these numbers have prefixes whereever local, mobile or shared.
$this->callarr contains numbers such 46703920293:402 or 4629304921:94 (number:duration of call).
can see 4670 1 prefix , 46 another. may seem confusing @ first later local call , first mobile call.
what doing: each number in callarr, first explode seperate number , duration. remove country code in case 46 grab first 2 numbers.
46703920293 magically turn 70 indicating mobile number.
each number go through pricelist array $this->pricearr.
pricearr have following structure number:price:type:oa.
example: 4670:0.65:mobile:0.15
pricelist contain prefix. oa = opening costs call.
on line 27 check if length of $number (which pricelist prefix) == 2. if it's 46 number local. if it's not remove 46(country code).
issue @ line 41. can find mobile matches, free cost , shared. have issues grabbing local calls. can see doing wrong here?
lot of text hope bear me!
Comments
Post a Comment