I just got started with CodeIgniter and am wondering will it slow things down if I put code like this in a loop.
$data['title'] = 'the title';
$data['content'] = 'blah blah blah';
$this->load->view('result', $data);
I'm not entirely sure how CodeIgniter handles things, or PHP itself for that matter. For example if I did this. Would the file be read on each iteration?
$data['title'] = 'the title';
$data['content'] = 'blah blah blah';
include 'result.php';
Also is it ok to load controls in a loop or am I missing something fundamental by putting a control in a loop? Thanks.
Additional info. I have search results for users' profiles... and I was thinking of making a slimmed down version of the profile view to display on the search results page. Would this be bad practice to use a view for that?