Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • wordwrap() Function in PHP

    • 0
    • 1
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 115
    Comment on it

    wordwrap() Function is a string function in which it wraps a string in new line, after a specific length.

    Syntax

    wordwrap(string,width,break,cut);
    

    In the syntax the parameter string is to break up into lines , the width is the maximum line width , break the characters to use as break.

    Example

     <?php
        $str = "An example of a long word is: Supercalifragilisticexpialidocious";
        echo wordwrap($str,15,"<br>\n",TRUE);
     ?>
    

    output
    An example of a
    long word is:
    Supercalifragil
    isticexpialidoc
    ious

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: