SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Zealot dragonfly7's Avatar
    Join Date
    May 2003
    Location
    ontario
    Posts
    156
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Quick href/array question

    We are displaying a list of data into 2 columns, each piece of data (text) displayed links to another page which displays more detail.

    We are using code from a code site which did not include links so we are trying to add the href to the code.

    The data array holds the text and the data2 array holds the cid.

    We are getting a syntax error on this line:
    [php]
    echo "<TD width=\"50%\"><li><a href=\"minutes_display.php?cid=$data2[$i + ($j * $rows)]\">" , $data[$i + ($j * $rows)] . "</a></TD></li>\n";
    [\php]

    Thanks in advance!

  2. #2
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,804
    Mentioned
    157 Post(s)
    Tagged
    3 Thread(s)
    this bit...
    PHP Code:
    ">" $data[$i + ($j $rows)] . "</ 
    shouldn't have a comma before $data[ it should be a period.
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  3. #3
    Crazy Webmaster Cr0CX's Avatar
    Join Date
    Dec 2003
    Location
    WWW
    Posts
    428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    $dis $data2[$i + ($j $rows)];
    $dat $data[$i + ($j $rows)];
    print 
    "<TD width=50%><li><a href=minutes_display.php?cid=$dis>$dat</a></TD></li>"
    Run a site? over 1,000 uniques a day? PM me for link exchange.

  4. #4
    SitePoint Zealot dragonfly7's Avatar
    Join Date
    May 2003
    Location
    ontario
    Posts
    156
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks so much - worked like a charm!!

  5. #5
    Crazy Webmaster Cr0CX's Avatar
    Join Date
    Dec 2003
    Location
    WWW
    Posts
    428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    mine or spikez?
    btw, you welcome
    Run a site? over 1,000 uniques a day? PM me for link exchange.

  6. #6
    SitePoint Zealot dragonfly7's Avatar
    Join Date
    May 2003
    Location
    ontario
    Posts
    156
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yours!! Thx again.

  7. #7
    Crazy Webmaster Cr0CX's Avatar
    Join Date
    Dec 2003
    Location
    WWW
    Posts
    428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No problem i love to help someone
    Run a site? over 1,000 uniques a day? PM me for link exchange.


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
  •