Results 1 to 10 of 34

Thread: Day 3 - String Operations - Become PHP Expert in 30 days.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #16
    Join Date
    Oct 2003
    Location
    Kochi, Kerala, India
    Posts
    21,389

    Default

    DAY 3 - strlen()

    http://php.flashwebhost.com/vineesh/day3/strlen.php

    Code
    Code:
    <?php
    
    $sentenceOne = 'Hello, I am Vineesh Mohan';
    $sentenceTwo = 'I am working in FlashWebHost.com';
    $sentenceThree = 'FlashWebHost.com provides Domain Registration, Hosting And Web Design Services';
    
    echo $sentenceOne . '<br>';
    echo $sentenceTwo . '<br>';
    echo $sentenceThree . '<br> <br>';
    
    
    echo strlen ($sentenceOne) . '<br>' ;
    echo strlen ($sentenceTwo) . '<br>' ;
    echo strlen ($sentenceThree);
    Another one:

    http://php.flashwebhost.com/vineesh/day3/strlen_1.php

    Code:
    <?php
    
    $name = 'Vineesh Mohan';
    $place = 'Kodamthuruth';
    $city = 'Alappuzha';
    
    
    echo 'I am ' . $name . '<br>' ;
    echo 'My native is ' . $place . '<br>';
    echo $place . 'is located in ' . $city . ' district. <br> <br>'; 
    
     
    echo 'First two lines contain ' . strlen ($name) . ', ' . strlen($place) . ' letters respectively. And the Third line contains ' . strlen('Kodamthuruthis located in Alappuzha district.') . ' letters.' ;
    Last edited by vineesh; 05-10-2014 at 10:36 AM.

Bookmarks

Posting Permissions

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