How does it download files with a code signal and pass variables?

I read the source code, but it seems a bit cryptic. I'm just trying to understand how CI converts an array into separate variables available for presentation.

I understand that the view is included in include (), but the variables seem to be effective only for the view.

Controller:

$this->load->view('about', array('title' => 'about'));

View:

<?php echo $title; // shows 'about' ?>
+5
source share
1 answer

php extract () function

$array = array('test' => 'val', 'key' => 'value');

extract($array);

var_dump($test);
var_dump($key);

$test $key "" , , , , ( ), , CI , .

+10

All Articles