• Archives

  • AddThis Social Bookmark Button

    Add to Technorati Favorites

  • Numeric array’s in php

    By krates | November 30, 2007

    Sometimes you need to create many similar variables. So you need arrays

    There are three different kind of arrays:

    In this post we will only discuss Numeric array:

    Syntax:

    $yourname = array(“Kushagra”,”Sanjay”,”Salman”);

    or

    $yourname[0] = “Kushagra”;

    $yourname[1] = “Sanjay”;

    $yourname[2] = “Salman”;

    Example 1

    <?php

    $yourname[0] = “Kushagra”;

    $yourname[1] = “Sanjay”;

    $yourname[2] = “Salman”;

    echo $yourname[0].” Was first named “.$yourname[1].” And then “.$yourname[2];

    ?>

    Thanks

    krates

    Share and Enjoy:
    • Digg
    • del.icio.us
    • Facebook
    • NewsVine
    • Reddit
    • StumbleUpon
    • YahooMyWeb
    • Google Bookmarks
    • Yahoo! Buzz
    • TwitThis
    • Live
    • LinkedIn
    • Pownce
    • MySpace

    Topics: PHP | No Comments »

    Related Links:

    Comments

    Security Code: