php-include

How can I make a php script add a tab to every line of an include file?

Within my HTML, I have a php script that includes a file. At that point, the code is indented 2 tabs. What I would like to do is make the php script add two tabs to each line. Here's an example: Main page: <body> <div> <?php include("test.inc"); ?> </div> </body> And "test.inc": <p>This is a test</p> <div> <p>This i...

Using CodeIgniter is it bad practice to load a view in a loop.

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 th...