Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jun 2002
    Location
    Arizona
    Posts
    175
    Thanks
    0
    Thanked 0 Times in 0 Posts

    a variable and a function and stuff

    ok, i have this:

    function cleanString($string)
    {
    trim($string);
    $string = htmlentities($string, ENT_QUOTES);
    $string = stripslashes($string);
    $string = nl2br($string);

    };
    cleanString($body);

    how do i get $body to equal the string after it has been cleaned?

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,273
    Thanks
    4
    Thanked 83 Times in 82 Posts
    function cleanString($string)
    {
    trim($string);
    $string = htmlentities($string, ENT_QUOTES);
    $string = stripslashes($string);
    $string = nl2br($string);

    };
    $body = cleanString($body);

    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #3
    Registered User
    Join Date
    Jun 2002
    Location
    Arizona
    Posts
    175
    Thanks
    0
    Thanked 0 Times in 0 Posts
    oh yeah... huh... i think i'll go... do something else...

    thanks


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •