php»ù´¡±Ê¼Ç Arrow difference
/***************************by
garcon1986********************************/
<?php
// -> ÊÇÖ¸¶ÔÏóµÄ·½·¨»òÕßÊôÐÔ
class Cart{
public function add_item($a,$b){
echo $a+$b.'<br>';
}
}
//$cart = new Cart; Á½¾äÒâÒåÏàͬ
$cart = new Cart();
$cart->add_item("10", 1);
// => Êý×éµÄÔªËØ¸³Öµ
//¼üÖµone¶ÔÓ¦µÄÖµÊÇ1, ¼üÖµtwo¶ÔÓ¦µÄÖµÊÇ2,¼üÖµ¶ÔÓ¦µÄÖµÊÇ3.
$a = array("one"=>1, "two"=>2, "three"=>3);
echo $a["one"].'<br>';
echo $a["two"].'<br>';
echo $a["three"].'<br>';
//$key=>$value Ö¸¼üÖµ¶ÔÓ¦µÄÖµ
foreach($a as $key => $value){
echo "The \$key is: $key, The \$value is: $value<br>";
}
?>
Ïà¹ØÎĵµ£º
ÔÎÄÁ´½Ó£ºhttp://www.phpdo.net/index.php/2010/02/09/1-12/
PHPµÄÊý¾ÝÀàÐ͵Äת»»ÓÐÁ½ÖÖ·½·¨¿ÉÒÔ°ìµ½£ºÖ±½ÓÊäÈëÄ¿±êµÄÊý¾ÝÀàÐͺÍͨ¹ýsettypeº¯ÊýʵÏÖ¡£
PHPÊý¾Ýת»»³ÉÕûÊý
FloatÐÍÊý¾Ýת»»³ÉintÐÍ
FloatÐÍת»»³ÉintÐÍ£¬Ð¡ÊýµãºóµÄÊý½«±»ÉáÆú¡£Èç¹ûfloatÊý³¬¹ó³¬¹ýÁËÕûÐ͵Äȡֵ·¶Î§£¬ÄÇô½á¹û¿ÉÄÜÊÇ0»òÕßÊÇÕûÐεÄ×îС¸º ......
±¾ÈËÕýÔÚ¿ª·¢Ò»Ì׹ɯ±ÏµÍ³£¬ÔÚÊý¾ÝºÍËã·¨·½ÃæÒѾûÓÐÎÊÌ⣬ÏÖѰÕÒÒ»ÃûÊìÁ·µÄPHP Web¿ª·¢ºÏ×÷ÈËÔ±£¬ÒªÇóÈçÏ£º
1.ÊìϤPHP+MySQL¿ª·¢£»
2.Äܹ»Éè¼ÆÖÆ×÷ÃÀ¹ÛµÄ½çÃæ£»
3.Äܹ»ÔÚϵͳÖÐÊìϤʹÓÃAjaxЧ¹û£»
4.ÊìÏ¤ÍøÉÏÖ§¸¶£¨Ö§¸¶±¦¡¢²Æ¸»Í¨»òÆäËû£©£»
5.ÊìϤÈËÈËÍø¡¢Ð£ÄÚ¡¢ÂþÓѵÈSNS¿ª·Åƽ̨¿ª·¢ÕßÓÅÏÈ£»
6.ÒªÇóÈËÔÚÉϺ££¬Ó ......
½üÀ´ÓÉÓÚ¹¤×÷µÄÐèÒª£¬¿ªÊ¼Ñ§Ï°Ê¹ÓÃPHP¡£
´Ó×òÌìÏÂÎçµ½½ñÌìÉÏÎ磬ÖÕÓÚ°Ñ¿ª·¢»·¾³´î½¨Íê±Ï¡£×ܵÄÀ´Ëµ£º³õ²½µÄÈÏʶÊÇ£ºPHPÔÚÍøÕ¾¿ª·¢ÉÏ£¬¹¦ÄÜ»¹ÊǺÜÇ¿´óµÄ¡£½ñÌìÏÂÎç³õ²½µÄ°ÑÓ﷨ʲôµÄÊìϤһÏ¡£ÒòΪ×ö¿ª·¢Õâô¶àÄêÁË£¬ºÜ¶àÓïÑÔ£¬»¹ÊÇÓеãÏàͬµÄ£¬ËùÒÔ£¬Ñ§Ï°ÆðÀ´²»ÊǺܷѾ¢¡£ºóÌì»ØÀϼң¬Ï£ÍûÄêºóÄÜÔÚPHPÉÏÓÐËùÌá¸ß¡£
Ò»¡¢± ......
PHPµÄÖ´ÐÐЧÂÊÊÇÓÐÄ¿¹²¶ÃµÄ£¬ÕâÒ²ÊÇÎÒϲ»¶ËüµÄÔÒòÖ®Ò»£¬ºÍËü³ÆÎª¾øÃî´îµµµÄMysqlÒÔ¼°ApacheÏëÈںϣ¬²»Äܲ»¾ªÌ¾ÆäЧÂÊÁË¡£PHP¸üÐÂÒ²ºÜ¿ì£¬ÕâÀïÁоÙÁËĿǰ×îа汾PHP4.3.2RC4£¨¼¸ºõûÓÐBUGÁË£¬¹À¼ÆÐ´ÍêÕâÆª²»¾ÃºóÕýʽ°æ¾Í³öÁË£©£¬ºÍ×îа汾µÄMysql4.0.13µÄ°²×°¹ý³Ì¡£
¡¡¡¡PHPµÄ°²×°Îļþ¿ÉÒÔÖ±½Óµ½ &nb ......
/***************************by
garcon1986********************************/
<?php
//if Óï¾ä
$a = $b = 3;
if($a = $b)
print "a is equal to b<br>";
//else Óï¾ä
if($a < $b){
print "a is smaller than b";
} else {
print "a is not smaller than b<br> ......