I am passing an array to a view from a controller. Simple stuff. Should work, but is behaving rather too strangely and I cannot figure out the bug.
This is the controller-
$link = "http://" . $server . ".something.com/uploads/" . $name;
$data = array(
'name' =>$name,
'server'=>$server,
'link'=>$link,
'username'=>$username
);
$this->load->view('photo_edit', $data); //sending $data to view
This is the view -
<img src = "<?php echo $link; ?>"/>
When the view loads, the $link
is just this - http://.something.com/uploads/
But when I echo the $link in the controller, its totally fine (with both the $server
and $name
showing correctly). There is some issue with passing the $link
.