About str_pad_php Tutorials

Source: Internet
Author: User
Problem
About Str_pad
Workaround
This is what the code says.

$the _max = 32;

$the _max = (int) intval (strlen ($the _max));



Print (Str_pad (' 1 ', $the _max, ' 0 ', str_pad_left));

?>


Copy the code The result is still 1, what's going on?

[ ]


Reference answer
No, I'm right about this test. 01
Reference answer
Originally Posted by lsx220 on 2009-1-4 02:03 [url=http://bbs.111cn.cn/redirect.php?goto=findpost&pid=814107&ptid=100305] Link marker [Img]http://bbs.111cn.cn/images/common/back.gif[/img][/url]
No, I'm right about this test. 01
I'm so weird right now, that's a damn thing.

http://www.bkjia.com/PHPjc/632580.html www.bkjia.com true http://www.bkjia.com/PHPjc/632580.html techarticle the question about the Str_pad solution code is this $the _max = +, $the _max = (int) intval (strlen ($the _max)), Print (Str_pad (' 1 ', $the _max, ' 0 ', Str_pad_left));?> Copy code its result ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.