These is what I have, I'm using Codeigniter MVC.
CONTROLLER
public function index() {
$sample = "call: 887-65-31";
$this->load->view('contact_view', $sample);
}
now how do i retrieve it on contact view page?
These is what I have, I'm using Codeigniter MVC.
CONTROLLER
public function index() {
$sample = "call: 887-65-31";
$this->load->view('contact_view', $sample);
}
now how do i retrieve it on contact view page?
Try this:
Controller
<?php
class Example extends CI_Controller {
public function index() {
$viewData['sample'] = "call: 887-65-31";
$this->load->view('contact_view', $viewData);
}
}
View
then echo in contact_view like below:
<?php
echo $sample;
?>