dimaslanjaka /
universal-framework
| 1 | <?php |
||
| 2 | |||
| 3 | $pdo = pdo()->select('data_msisdn', 'msisdn'); |
||
| 4 | if (isset($_REQUEST['simcard'])) { |
||
| 5 | $pdo->where(['simcard' => strtolower($_REQUEST['simcard'])]); |
||
| 6 | } |
||
| 7 | $row = $pdo->row_array(); |
||
| 8 | $row = array_map(function ($db) { |
||
| 9 | if (isset($db['msisdn'])) { |
||
| 10 | if (strlen($db['msisdn']) <= 7) return; |
||
| 11 | return $db['msisdn']; |
||
| 12 | } |
||
| 13 | }, $row); |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 14 | $row = array_unique(array_values(array_filter($row))); |
||
| 15 | \JSON\json::json($row); |
||
| 16 |