Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

phpÖУ¬¹ØÓÚÕû³ýµÄ3¸öº¯Êý2008

phpÖУ¬¹ØÓÚÕû³ýµÄ3¸öº¯Êý
2008-10-23 23:25
Ceil: ¼ÆËã´óÓÚÖ¸¶¨ÊýµÄ×îСÕûÊý¡£
Floor: ¼ÆËãСÓÚÖ¸¶¨ÊýµÄ×î´óÕûÊý¡£
round: ËÄÉáÎåÈë¡£
¸ù¾ÝÐèҪѡÓÃ
<?php
$a=20;
$b = 6;
echo ($a/$b)."<br>"; //out 3.3333333333333
echo ceil($a/$b)."<br>"; //out 4
echo floor($a/$b)."<br>"; //out 3
echo round($a/$b)."<br>"; //out 3
?>


Ïà¹ØÎĵµ£º

40¸ö¼£Ïó±íÃ÷Ä㻹ÊÇPHP²ËÄñ

ËäÈ»ÏÂÃæµÄ¶«Î÷ÊÇÕë¶ÔPHP¿ª·¢ÈËԱ˵µÄ£¬ÆäʵºÜ¶àÔ­Ôò¶¼ÊÇͨÓõģ¬ASP.NET,JSP¿ª·¢ÈËÔ±Ò²Ò»Ñù¿ÉÒÔ²ÎÕÕ£¡ ÌùÔÚÕâÀïºÍ´ó¼Ò¹²Ã㣡
ÎÄ×÷ÕߣºReinhold Weber
Ô­ÎÄÁ´½Ó£º40 signs you really are a lousy PHP programmer
ÒëÕߣºdavidkoree
40¸ö¼£Ïó±íÃ÷Ä㻹ÊÇPHP²ËÄñ
ÎÒÔ¸Òâ°Ñ±¾ÎĹéÈëÎҵē±à³ÌôÜÊ”ϵÁС£¾¡¹ÜÔÚ ......

PHP³Á˼¼֮¹¤×÷Ä£ÐÍ

PHP³Á˼¼
¡¡¡¡¹¤×÷Ä£ÐÍ
¡¡¡¡PHPµÄ¹¤×÷Ä£Ðͷdz£ÌØÊâ¡£´ÓijÖ̶ֳÈÉÏ˵£¬PHPºÍASP¡¢ASP.NET¡¢JSP/ServletµÈÁ÷ÐеÄWeb¼¼Êõ£¬ÓÐ×ű¾ÖÊÉϵÄÇø±ð¡£
¡¡¡¡ÒÔJavaΪÀý£¬JavaÔÚWebÓ¦ÓÃÁìÓò£¬ÓÐÁ½ÖÖ¼¼Êõ£ºJava ServletºÍJSP£¨Java Server Page£©¡£Java ServletÊÇÒ»ÖÖÌØÊâÀàÐ͵ÄJava³ÌÐò£¬Ëüͨ¹ýʵÏÖÏà¹Ø½Ó¿Ú£¬´¦ÀíWeb·þÎñÆ÷·¢Ë͹ ......

Ê®Ììѧ»áphpÖ®µÚ¶þÌì

ѧϰĿµÄ£ºÕÆÎÕphpµÄÁ÷³Ì¿ØÖÆ
¡¡¡¡1¡¢if..else Ñ­»·ÓÐÈýÖֽṹ
¡¡¡¡µÚÒ»ÖÖÊÇÖ»ÓÐÓõ½ if Ìõ¼þ£¬µ±×÷µ¥´¿µÄÅжϡ£½âÊÍ³É "Èô·¢ÉúÁËijÊÂÔòÔõÑù´¦Àí"¡£Óï·¨ÈçÏ£º
¡¡¡¡if (expr) { statement }
¡¡¡¡ÆäÖÐµÄ expr ΪÅжϵÄÌõ¼þ£¬Í¨³£¶¼ÊÇÓÃÂß¼­ÔËËã·ûºÅµ±ÅжϵÄÌõ¼þ¡£¶ø statement Ϊ·ûºÏÌõ¼þµÄÖ´Ðв¿·Ö³ÌÐò£¬Èô³ÌÐòÖ»ÓÐÒ»ÐÐ ......

Ê®Ììѧ»áphpÖ®µÚÆßÌì

ѧϰĿµÄ£ºÑ§»áSESSIONµÄʹÓÃ
¡¡¡¡SESSIONµÄ×÷Óúܶ࣬×î¶àÓõľÍÊÇÕ¾µãÄÚÒ³Ãæ¼ä±äÁ¿´«µÝ¡£ÔÚÒ³Ã濪ʼÎÒÃÇÒªsession_start();¿ªÆôSESSION£»
¡¡¡¡
¡¡¡¡È»ºó¾Í¿ÉÒÔʹÓÃSESSION±äÁ¿ÁË£¬±ÈÈç˵Ҫ¸³Öµ¾ÍÊÇ£º$_SESSION['item']="item1";ÒªµÃµ½Öµ¾ÍÊÇ$item1=$_SESSION['item'];£¬ºÜ¼òµ¥°É¡£ÕâÀïÎÒÃÇ¿ÉÄÜ»áʹÓõ½Ò»Ð©º¯Êý£¬±ÈÈçË ......

PhpÊý×é

 
1,¶¨Î»Êý×飺
bool in_array ( mixed needle,array haystack[,bool strict]) ²éÕÒÖ¸¶¨ÔªËØ£»
array array_keys (arraqy input [, mixed search_value]) ·µ»Ø¼üÖµ×é³ÉµÄÊý×飻
bool array_key_exists(mixed key,array search) ÅжϼüÖµÊÇ·ñΪָ¶¨µÄ¼üÖµ£»
array array_values (array input) ·µ»ØÊý×éÖеÄÔªËØÖµ£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ