Route CodeIgniter HMVC

Struktur HMVC :

application 
|__ controllers 
|__ models 
|__ views 
.. 
|__ modules 
    |__ content 
    |   |__ controllers 
    |   |   |__ admin.php 
    |   |   |__ content.php 
..

Route untuk Admin :

$route['admin/([a-zA-Z_-]+)']            	= '$1/admin/index';
$route['admin/([a-zA-Z_-]+)/(:any)']    	= '$1/admin/$2';

URL Semula :

http://localhost/project_web/content/admin/
http://localhost/project_web/content/admin/add
http://localhost/project_web/content/admin/edit/1

URL Menjadi :

http://localhost/project_web/admin/content/
http://localhost/project_web/admin/content/add
http://localhost/project_web/admin/content/edit/1

Facebook comments:

comments

Foreach PHP

Example:

$people['me'] = ‘robert’; $people['friend'] = ‘sam’; $people['girl'] = ‘bailey’;

foreach($people as $key => $val) { // ${“me”} = ‘robert’

${$key} = $val; //or $$key = $val; }

So that

echo $me; //echo “robert”;

Facebook comments:

comments