Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 4 of 4

This is a discussion on What's wrong with this string? in the Shared & Semi-Dedicated forum
I'm trying to insert a link in my dvd database. linkid is a field in the table that inserts part of the url. title is ...

  1. #1
    Aletia Customer
    Join Date
    Oct 2001
    Posts
    631

    What's wrong with this string?

    I'm trying to insert a link in my dvd database. linkid is a field in the table that inserts part of the url. title is a field in the table that inserts the link text. What am I doing wrong? Here is the code in the original code, then the code in the modified version.

    PHP Code:
    echo '<td class="center">' $value['title'] . '</td>'
    PHP Code:
    echo '<td class="center"><a href="http://www.imdb.com/title/' $value['linkid'] . "/> ' . $value['title'] . '</a></td>'; 
    watchdog

  2. #2
    Loyal Client
    Join Date
    Sep 2001
    Location
    Wichita, KS
    Posts
    1,647
    Quote Originally Posted by Joshua Clinard
    PHP Code:
    echo '<td class="center"><a href="http://www.imdb.com/title/' $value['linkid'] . "/> ' . $value['title'] . '</a></td>'; 

    look at the line tag, where you end the first part, there is a mistake. Try this:

    PHP Code:
    echo '<td class="center"><a href="http://www.imdb.com/title/' $value['linkid'] . '" /> ' $value['title'] . '</a></td>'
    note where I made the change:
    echo '<td class="center"><a href="http://www.imdb.com/title/' . $value['linkid'] . "/> ' . $value['title'] . '</a></td>';

  3. #3
    || $name ne 'R.Stiltskin'
    Join Date
    Jun 2003
    Location
    Tejas
    Posts
    2,438
    Quote Originally Posted by Joshua Clinard
    PHP Code:
    echo '<td class="center"><a href="http://www.imdb.com/title/' $value['linkid'] . "/> ' . $value['title'] . '</a></td>'; 
    Looks like an unbalanced, quoted dot-join string with a superfluous slash.
    PHP Code:
    echo '<td class="center"><a href="http://www.imdb.com/title/' $value['linkid'] . '">' $value['title'] . '</a></td>'
    Change "/> ' to '">' (sgl-quote|dbl-quote|gt|sgl-quote). I don't know if you need to double quote interpolate the "$values['here']" or not, but I'd assume it's Perlish in this regard.
    Last edited by Spathiphyllum; 05-26-2005 at 01:52 PM. Reason: Removed superfluous n from an

  4. #4
    Aletia Customer
    Join Date
    Oct 2001
    Posts
    631
    Thanks. That worked perfect.

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
  •