Welcome Guest, Not a member yet? Register   Sign In
What are the difference between $this->data->total_pages and $data['total_pages']
#5

[eluser]shinokada[/eluser]
@bretticus, thank you for your reply and time. I appreciate it.

The code I am studying is pryrocms by Phil.

He uses this $this->data->total_pages in controller and in a view as well.

In view,
Code:
<li>
            &lt;?php if($this->data->total_pages == 1)
            {
                echo '1 Page';
            }
            else
            {
                echo $this->data->total_pages . ' Pages';
            }
            ?&gt;
        </li>

Is it common to do it?

I thought $data['total_page'] in controller and use it as $total_page is more CI way.

Is there any benefit using $this->data->total_pages rather than $data['total_page']?


Messages In This Thread
What are the difference between $this->data->total_pages and $data['total_pages'] - by El Forum - 01-22-2010, 01:46 AM



Theme © iAndrew 2016 - Forum software by © MyBB