Advertisement
m03r

Untitled

Oct 6th, 2015
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.30 KB | None | 0 0
  1. <?php
  2.         function parse($response) {
  3.             return array_reduce(explode('<br>', $response), function ($r, $item) {
  4.                 if (preg_match('#^(.+)=(.+)$#', $item, $matches))
  5.                     $r[$matches[1]] = $matches[2];
  6.                 return $r;
  7.             }, array());
  8.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement