Hamlets666 Posted December 7, 2006 Share Posted December 7, 2006 I have a array "world" and i`m tired of wroting $world['***'], so I was thinking could I get varuables look like this $***, using foreach? Link to comment https://forums.phpfreaks.com/topic/29805-foreach-get-varuables-from-array/ Share on other sites More sharing options...
taith Posted December 7, 2006 Share Posted December 7, 2006 [code]<?foreach($world as $k=>$v) $$k=$v;?>[/code]and there ya go... your array just turned into a whole wack of variables... Link to comment https://forums.phpfreaks.com/topic/29805-foreach-get-varuables-from-array/#findComment-136852 Share on other sites More sharing options...
Hamlets666 Posted December 7, 2006 Author Share Posted December 7, 2006 Great, thanks Link to comment https://forums.phpfreaks.com/topic/29805-foreach-get-varuables-from-array/#findComment-136856 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.