Home >Backend Development >PHP Tutorial >代码中的$form各表示什么,该如何解决

代码中的$form各表示什么,该如何解决

WBOY
WBOYOriginal
2016-06-13 11:41:37809browse

代码中的$form各表示什么
下面这段代码中的$form一会声明这个一会又赋值那个,实在是乱七八糟,不知这些在逻辑上怎么顺承的?

function __toString(){<br />			$form='<form action="'.$this->action.'" method="post" >';<br />			<br />			switch($this->shape){<br />				case "rect":<br />					$form.=$this->getRect();<br />					break;<br />				case "triangle":<br />					$form.=$this->getTriangle();<br />					break;<br /><br />				case "circle":<br />					$form.=$this->getCircle();<br />					break;<br /><br />				default:<br />					$form.='请选择一个形状<br>';<br />			}<br />			$form.='<input type="submit" name="sub" value="计算">';<br />			$form.='</form>';<br />			return $form;<br />		}

连字符
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn