tags:

views:

42

answers:

1

Here is part of my my php code:

while ( $row = mysql_fetch_array($result) ) {

 printf("PDB Code: %s<br>  Protein Name: %s<br> RCSB URL: %s <br> JMOL View: %s <br> Ligand Code: %s<br> Ligand Formula: %s<br> Ligand Name: %s<br> Smile String: %s<br><br> ", $row[0], $row[1], <a href='urlencode($row[2])'>, $row[3], $row[4], $row[5],$row[6],$row[7]);  

}

Ive tried everything, so row 2 and 3 are both links, but everytime i apply html link code i get a blank screen. When i remove the code around row 2 and 3 it works fine again.

Iv'e edited the above code so it now contains the problem code.

Any ideas?

Thanks in advance

+3  A: 

Educated guess: That is most probably because when entering <a href=".... you break the string by using " twice.

Try using only single quotes ' within the link, or escaping the double quotes like so: <a href=\"url\">

Check out the PHP manual on string syntax.

Pekka