extract($str) is what you're looking for. Takes an array and breaks it up into individual variables using the keys of the array as the variable names.
http://php.net/manual/en/function.extract.php
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.