Results 1 to 10 of 42

Thread: Day 5 - Array - Become PHP Expert in 30 days

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #13
    Join Date
    Nov 2009
    Posts
    76,596

    Default

    http://php.flashwebhost.com/sherly/statesname.php

    Code:
    <?php
    
    $states = array('Kerala' , 'Tamil Nadu' , 'Karnataka' , 'Rajastan' , 'Orissa' );
    
    $numberOfStates = count($states);
    echo '<pre>';
    print_r($states);
    
    echo '<p> I am going to add 2 more states to $states array. </p>';
    
    $states[] = 'Kerala';
    $states[] = 'Tamil Nadu';
    
    echo '<pre>';
    print_r ($states);
    echo '</pre>';
    Last edited by sherlyk; 05-14-2014 at 09:33 AM.

Tags for this Thread

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
  •