PHPize Online / SQLize Online

A A A
Share   Donate   Blog   Popular
Copy Format Clear
Copy
Copy Format Clear
<?php $result['Header'] = 'header @LOC = 1, @USERNAME = Tom,'; print_r($result['Header']); preg_match_all('/@(\S+) = ([^,]+),/', $result['Header'], $matches); $vars = array_combine($matches[1], $matches[2]); print_r($vars);
Show:  
Copy