this is my module
function order_alert($email){
$this->db->select("tbl_customer_registration.cus_mobile");
$this->db->from('tbl_customer_registration');
$this->db->where('tbl_customer_registration.cus_email', $email);
$query = $this->db->get();
echo '<pre>';
print_r($query->result()) ;
}
It return the following result for the above code
Array
(
[0] => stdClass Object
(
[cus_mobile] => 0716352642
)
)
In the contoller I use foreach
foreach($result as $row) :
echo $row['cus_mobile'];
to get [cus_mobile] out of the above array but it gives me all [cus_mobile] rows in the tbl_customer_registration.
How do I get the only [cus_mobile] => 0716352642 out of it.