phpÈçºÎ½ØÈ¡×Ö·û´®²¢ÒÔÁã²¹Æëstr_pad() º¯Êý
¶¨ÒåºÍÓ÷¨
str_pad() º¯Êý°Ñ×Ö·û´®Ìî³äΪָ¶¨µÄ³¤¶È¡£
Óï·¨
str_pad(string,length,pad_string,pad_type)
²ÎÊý | ÃèÊö |
---|---|
string | ±ØÐè¡£¹æ¶¨ÒªÌî³äµÄ×Ö·û´®¡£ |
length | ±ØÐè¡£¹æ¶¨ÐÂ×Ö·û´®µÄ³¤¶È¡£Èç¹û¸ÃֵСÓÚÔʼ×Ö·û´®µÄ³¤¶È£¬Ôò²»½øÐÐÈκβÙ×÷¡£ |
pad_string | ¿ÉÑ¡¡£¹æ¶¨¹©Ìî³äʹÓõÄ×Ö·û´®¡£Ä¬ÈÏÊǿհס£ |
pad_type |
¿ÉÑ¡¡£¹æ¶¨Ìî³ä×Ö·û´®µÄÄDZߡ£ ¿ÉÄܵÄÖµ£º
|
Àý×Ó 1
$str = "http://www.haohailuo.com"; echo str_pad($str,30,".");
Êä³ö£ºhttp://www.haohailuo.com......
Àý×Ó 2
$str = "http://www.haohailuo.com"; echo str_pad($str,30,".",STR_PAD_LEFT);
Êä³ö£º......http://www.haohailuo.com
Àý×Ó 3
$str = "http://www.haohailuo.com"; echo str_pad($str,30,".:",STR_PAD_BOTH);Êä³ö£º...http://www.haohailuo.com...
ÍƼöÐÅÏ¢
- ¡¾ÊÓƵ²¥·Å¡¿JplayerÊÓƵ²¥·ÅÆ÷µÄʹÓÃ
- memcacheÄÚ´æÔÀí
- Memcache¼¼Êõ·ÖÏí£º½éÉÜ¡¢Ê¹Óᢴ洢¡¢Ëã·¨¡¢ÓÅ»¯....
- php³£ÓÃÕýÔò±í´ïʽ
- phpÐÔÄܼà²âÄ£¿éXHProf
- ÈÃCI¿ò¼ÜÖ§³Öservice²ã
- ʹÓÃPHPÉú³É´øLOGOµÄ¸öÐÔ»¯¶þάÂëͼÏñ
- ¹ØÓÚCodeIgniterÄã¿ÉÄܲ»ÖªµÀµÄ5¸ö֪ʶµã
- Memcache ºÁÃ뼶³¬Ê±¼°ÆäËû³£¼ûÎÊÌâ»ã×Ü
- [PHP±Ê¼Ç]PHPQueryÒ»¸ö´¦ÀíDOMµÄÀûÆ÷
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- PHP»ñÈ¡Óû§µÄÕæʵIP£¬²¢ÅжÏÊÇ·ñÄÚÍøIP
- PHP ´íÎóÈÕÖ¾ error_log
- ÀûÓÃbigpipe»úÖÆʵÏÖÒ³ÃæÄ£¿éµÄÒì²½äÖȾ chunked¼¼Êõ
- php¿ØÖÆÎļþÏÂÔØËÙ¶È
- js + php ¶ÁÈ¡¡¢²¥·ÅÊÓƵÁ÷ ¼æÈÝfirefox£¬c....
- ¡¾ÊÓƵ²¥·Å¡¿JplayerÊÓƵ²¥·ÅÆ÷µÄʹÓÃ
- UNICODE Óë UTF-8 µÄ¹Øϵ
- memcacheÄÚ´æÔÀí
- Memcache¼¼Êõ·ÖÏí£º½éÉÜ¡¢Ê¹Óᢴ洢¡¢Ëã·¨¡¢ÓÅ»¯....
- phpʹÓÃmb_detect_encoding¼ì²â×Ö·û´®±àÂë
ÆÀÂÛ