Results 1 to 10 of 42

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

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2014
    Posts
    21

    Default

    php.flashwebhost.com/austin/array.php

    Code:
    <?php
    $ar= array('christmas','holy','onam','easter');
    $ar[1] = 'whale';
    $ar[]= 'kills';
    foreach($ar as $a ){
    echo $a. '<br>';
    }

  2. #2
    Join Date
    Sep 2003
    Posts
    3,040

    Default

    @vineesh good work, you done lot of experiments/modifications. Way to go :)

    @Austinwhite Nice simple script.
    Become PHP Expert in 30 days
    FreeMarriage.com - Free Online Matrimonial
    FlashWebHost.com - Professional Web Hosting, Designing.

  3. #3
    Join Date
    Jan 2008
    Location
    india,kerala-god's own country
    Posts
    14,007

    Default

    DAY 5 PHP PROGRAMMING - MY CODE

    http://php.flashwebhost.com/ramesh/day-5/array_5.php

    PHP Code:
    <?php

    $team_india 
    = array('Sachin''Ganguly''Dravid''Sevang''Yuvaraj''Doni');

    echo 
    '<pre>';
    print_r($team_india);
    echo 
    '<br>';

    echo (
    'Select More Indian Cricket Team for Upcoming World Cup.');

    $team_india[] = 'Gautam Gambhir';
    $team_india[] = 'Suresh Raina';
    $team_india[] = 'Virat Kohli';
    $team_india[] = 'Ajinkya Rahane';
    $team_india[] = 'Rohit Sharma';
    $team_india[] = 'Zaheer Khan';
    $team_india[] = 'Ishant Sharma';
    $team_india[] = 'R Vinay Kumar';
    $team_india[] = 'Jedeja';
    $team_india[] = 'Ashwin';

    echo 
    '<pre>';

    foreach(
    $team_india as $india) {
        echo 
    ucwords($india);
        echo 
    '<br>';
    }

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
  •