Possible Duplicate:
Array to named variables
How can I convert an array like this
$data = array(
'name' => 'something',
'another' => 'variable'
);
to
$name = 'something';
$another = 'variable';
Is there a way how I can do this without looping?
That what you want to do is basically bad idea. If you are extracting array with data that comes from user, it's easy to hack your site. But if you really want to do this, use extract function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With