OOP_code 43-Grouping-Related-Properies-and-Methods

<?php namespace app\app;


$thumb=new Thumnail('img.jpg');
$thumb->size('100,100');

/**
*
*/
class Databases{
// public $conn;
protected $conn;
protected $table;

public function __construct()
{
// connected to database
$this->conn='connected';
}

public function get_table($table){
$this->table=$table;
}

public function insert(){
// echo $this->conn;
return 'get the rows';
}

public function get($limit=10){
return 'insert all rows ' .$this->table.' table';
}
public function where($id,$key){
return"where is where $id extc  write $key.";
}
}

$db=new Databases();
$db->get_table('hello');
$rows=$db->get(2);

echo $rows;



?>

Comments