Yeah, it is a shame to ask but I do not know and do not find … How can I define a link to a string so that the string is displayed and people can click to access mysite.com?
@bathurst_guyOct 05.2006 — #Well your question is a little hard to follow, but do you understand what PHP is and what HTML is. PHP processes certain functions and requests on the server, then echos HTML code out to the browser. So a link written in PHP would still actually be a hyperlink coded in HTML. You would only need PHP to create a link if the link was a variable and would be changed, example:[code=php]<? $linkvar = "mysite.com"; echo '<p><a href="'.$linkvar.'">Link</a>'; ?>[/code]
If that doesn't make sense then your going to have to explain your querie better so that we can assist.
@patimagesauthorOct 05.2006 — #I know my knowledge is limited and I must start to piss of people with all my questions but be sure that I learn fast with you guys ! And by the way, you perfectly answered my question !
@patimagesauthorOct 05.2006 — #Oups... little problem here : what an I doing wrong ? echo "<tr style='color: #ffff00'><td width=70%><a href="'.$linkvar.'">$t</a></td><td>$ss</td><td>$se</td><td>$l</td></tr>n";[/QUOTE]
You were closing the original opening double-quote, then reopening a new string within single-quote without placing a . or , character within the echo statement; this was causing a T_CONSTANT_ENCAPSED_STRING error.
The syntax I think you were trying to replicate was: [code=php] echo "<tr style='color: #ffff00'><td width=70%><a href='".$linkvar."'>$t</a></td><td>$ss</td><td>$se</td><td>$l</td></tr>n";[/code] Which would have been valid, although as you are using a double-quote string, variables may be referenced within the string. If you are unsure whether they will be parsed properly, enclose them within {} style parentheses. Eg: [code=php] echo "string{$variable}string"; [/code]