For example, there’s main view that include partial view from another view. What is better between:
<html><head>...</head><body>
<?php $this->view("anotherview.php"); ?>
</body>
</html>
and:
<html><head>...</head><body>
<?php include "anotherview.php"; ?>
</body>
</html>
I know the first one is the official way to the in Codeigniter’s View. But is there any tradeoff/concern if i use the second version?
More information here https://stackoverflow.com/questions/474641/why-should-i-use-an-mvc-framework-for-php
But in short, no you do not have to use
$this->view("anotherview.php");however, if you do not use it, then there is not much point using the codeigniter framework altogether.