SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: syntax problem

  1. #1
    SitePoint Member
    Join Date
    Sep 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    syntax problem

    hi

    whats wrong with this code
    Code:
    <?php
    $name[0]="AZEEM";
    $name[1]="SIRAJ";
    $name[2]="MUNZIF";
    for($i=0;$i<(count($name));$i+=1){
    print $name[i]."<br>";
    }
    ?>

  2. #2
    Sell crazy someplace else markl999's Avatar
    Join Date
    Aug 2003
    Location
    Manchester, UK
    Posts
    4,007
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    print $name[i]."<br>";

    Should be:

    print $name[$i]."<br>";

  3. #3
    SitePoint Member
    Join Date
    Sep 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks Mark. its working..

    buy


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
  •