Welcome Guest, Not a member yet? Register   Sign In
Templates
#6

[eluser]Perkin5[/eluser]
I don't think you're getting my point. I understand perfectly how a view is loaded with the $data array. My question is about the population of the $data array. It's the line:

Code:
$data['content']='contact_us';

that puzzles me. What it's actually doing is loading the contents of the file contact_us.php into the array, so the key is 'content' and the value is 'whatever is in the file'.

How does CI know that I didn't want the value to be the text contact_us?

Does it first do a search for matching filenames and only then, if no matches, assume I mean text?


Messages In This Thread
Templates - by El Forum - 07-12-2011, 11:53 AM
Templates - by El Forum - 07-12-2011, 08:02 PM
Templates - by El Forum - 07-12-2011, 08:42 PM
Templates - by El Forum - 07-13-2011, 02:18 AM
Templates - by El Forum - 07-13-2011, 02:53 AM
Templates - by El Forum - 07-13-2011, 04:36 AM
Templates - by El Forum - 07-13-2011, 04:42 AM
Templates - by El Forum - 07-13-2011, 05:02 AM
Templates - by El Forum - 07-13-2011, 02:48 PM
Templates - by El Forum - 07-13-2011, 03:01 PM
Templates - by El Forum - 07-13-2011, 03:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB