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

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

WBOY
Release: 2016-06-13 12:32:11
Original
947 people have browsed it

代码中的$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 />
		}
Copy after login

连字符
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template