This is my Model:
?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Specs_model extends CI_Model{
$data['phone'] = array (
'Body'=> array(
'Dimensions'=>'142 x 72.5 x 8.1 mm (5.59 x 2.85 x 0.32 in)',
'Weight'=> '145 g (5.11 oz)',
'Sim'=>'Micro-SIM'
),
'Display'=> array(
'Type'=>'Super AMOLED capacitive touchscreen, 16M colors',
'Size'=>' 5.1 inches (~69.6% screen-to-body ratio)',
'Resolution'=>'1080 x 1920 pixels (~432 ppi pixel density)',
'Multitouch'=>'Yes',
'Protection'=>'Corning Gorilla Glass 3'
),
'Platform' => array (
'OS'=>' Android OS, v4.4.2 (KitKat), upgradable to v6.0 (Marshmallow)',
'Chipset'=>'Qualcomm MSM8974AC Snapdragon 801',
'CPU'=>'Quad-core 2.5 GHz Krait 400',
'GPU'=>'Adreno 330'
)
);
function getPhoneData(){
return $this->result_array();
}
This is the controller
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Specifications extends CI_Controller {
function index() {
// $data['phone'] = array('John Doe', 'Alex Ferguson', 'Jose Mourinho');
$this->load->model('Specs_model');
$data['phone'] = $this->Specs_model->read()
$this->load->view('Specifications', $data);
}
}
?>
I'm getting the following reply:
Severity: Parsing Error
Message: syntax error, unexpected T_VARIABLE
Filename: controllers/Specifications.php
Line Number: 12
Backtrace:
Could someone tell me what am I doing wrong
Thanks
Greg