String Functions in PHP

This is the basic PHP exercise about string. A string allows different operations in PHP like convert all string in Upper case, lower case and Concatenate.

Source Code 

<html>
 <title> PHP Strings Demo </title>
  <body>
  <?php
   echo "Simple Strings";
  ?>
  <?php
    echo "<br />";
       echo "<br />";
    $f_String = "AsAd NaEeM ";
    $s_String = "AN_DEvEloPer ";
    echo $f_String;
    echo $s_String;
    echo "<br />";
    echo "<br />";
  ?>
  
  <?php
   echo "Concate Strings";
   echo "<br />";
   echo "<br />";
  ?>
  <?php
    $t_String = $f_String;
    $t_String .= $s_String;
    echo $t_String;
    echo "<br />";
    echo "<br />";
  ?>
  <?php
   echo "LowerCase Strings";
   echo "<br />";
   echo "<br />";   
  ?>
  <?php
    echo strtolower($t_String);
    echo "<br />";
    echo "<br />";
  ?>
  <?php
   echo "UpperCase Strings";
   echo "<br />";
   echo "<br />";
  ?>
  <?php
    echo strtoupper($t_String);
    echo "<br />";
    echo "<br />";
  ?>
  </body>

</html>


Output of the Program


Functions of String


Share on Google Plus

About Asad

Asad Niazi is Software Engineer , Programmer, Web Developer and a young mentor of BloggersTown and PProgramming. Asad Love to writes about Technology, Programming, Blogging and make money online.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment