Quick php question.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mkx
    Confirmed User
    • Nov 2003
    • 4001

    #1

    Quick php question.

    I need to echo the following from a form post but make it echo the variable in lowercase.

    This does upper case:

    <?php echo $_POST["cat1"]; ?>

    What does lower case?


    Thanks!
  • woj
    <&(©¿©)&>
    • Jul 2002
    • 47880

    #2
    <?php echo strtolower($_POST["cat1"]); ?>
    Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
    Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
    Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager

    Comment

    • mkx
      Confirmed User
      • Nov 2003
      • 4001

      #3
      i love you

      Comment

      • Why
        MFBA
        • Mar 2003
        • 7230

        #4
        www.php.net and download the help .chm

        Comment

        • Azlord
          Confirmed User
          • Dec 2003
          • 2651

          #5
          <?=strtolower($_POST["cat1"])?>

          I like that better. the <?php echo strtolower($_POST["cat1"]); ?> for one line in between html looks look ugly.

          Comment

          • psili
            Confirmed User
            • Apr 2003
            • 5526

            #6
            My way is much better:

            Code:
            <?php
            $exp = explode($_POST["cat1"]);
            $str = "";
            for($i=0;$i<count($exp);$i++)
            {
               $str = $str . strtolower($exp[$i]);
            }
            ?>
            <?=echo $str?>
            Your post count means nothing.

            Comment

            Working...