i have object like this
$interest
Array
(
[0] => Array
(
[item_id] => 7
[item_name] => Jogging
)
[1] => Array
(
[item_id] => 8
[item_name] => Entertainment
)
)
and array like this
$profile
Array
(
[username] => admin
[email] =>
[fullname] =>
[profile] => http://pickaface.net/includes/themes/clean/img/slide4.png
)
i have sent it to view like following
$this->load->view('users/profile',$profile,$interest);
but when pass like this i cannot retrieve $interest
object. at profile
view
but if i pass only $interest
i can get it. the problem is when i pass both at a time
$this->load->view
function expects three parameters : (Loading Views)
view uri (which you entered correctly)
associative array(key=>value) containing data units to be retrieved at views end as $key
boolean value (optional) that you can use to change the behavior of the function so that it returns data as a string (if set to true) or sends it to your browser(if set to false which is default)
To send multiple data units you will have to use an associative array. Try sending the data like this:
$data = array(
'interest' => $interest,
'profile' => $profile,
);
$this->load->view('users/profile',$data);
In profile.php view file you can retrieve this data as $interest and $profile.