Jump to content

Fully Understanding MVC Concept?


Liquid Fire

Recommended Posts

i think thorpe meant 'extract() which takes an associative array and creates variables of same name as key in the local scope.

 

<?php
$myarray = array(
   'dog' => 'woof',
   'cat' => 'miaw'
);
extract($myarray);

echo $dog; // outputs 'woof'
echo $cat; // outputs 'miaw'
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

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.