in asp.net there are controls like grideview, menus, .....
how to develop a web control in php like an editor [html, jscript, ajax calls to server] it is used repeatedly and the improvement of control will be better if we can separate it?
First of, be aware that in PHP "control" and worse, "controller" means completely differently.
I've not used ASP, but I've used Delphi extensively, as well as Delphi for PHP, which does the same thing you are asking about (yes, in PHP).
Basically, you need some sort of framework to build this stuff on, as Johann said, you might want to use MVC, but you don't really have to.
Example of such a system (without MVC):
class TControl {
public $width=0;
public $height=0;
public $name='ControlN';
public function render(){
echo '<div style="width:'.(int)$this->width.'px; height:'.(int)$this->height.'px;"/>';
}
}
class TLabel {
public $caption='Label';
public function render(){
echo '<div style="width:'.(int)$this->width.'px; height:'.(int)$this->height.'px;">'.htmlspecialchars($this->caption,ENT_QUOTES).'</div>';
}
}
$label=new TLabel();
$label->width=200;
$label->height=24;
$label->caption='My label!';
$label->render();