PHP中 >=和->是什么意思

最好发一些实例代码说明一下谢 了

>=就是大于等于,一般用于if语句,很好理解
->用于类操作,举例如下:
<?php
// starting word
$word = new COM("word.application") or die("Unable to instantiate Word");
echo "Loaded Word, version {$word->Version}\n";
//bring it to front
$word->Visible = 1;
//open an empty document
$word->Documents->Add();
//do some weird stuff
$word->Selection->TypeText("This is a test...");
$word->Documents[1]->SaveAs("Useless test.doc");
//closing word
$word->Quit();
//free the object
$word = null;
?>追问

不好意思这个>=刚才写错了 应该是 =>这个是什么意思。 能不能用中文解释 谢了

追答

=>用于数组定义
例:$array=array("a"=>123,"b"=>234);
使用print_r($array)则输出为:
Array
(
[a] => 123
[b] => 234
)

温馨提示:答案为网友推荐,仅供参考
相似回答