![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Mar 2004
Posts: 455
|
another PHP/MySQL question
I am creating links for mysql data..
my code looks like this Code:
echo "<a href=".$row['url']." title=".$row['title'].">".$row['name']."</a>"; thanks! ![]()
__________________
’ |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Mar 2004
Posts: 455
|
the name should still be displayed, just not the link
__________________
’ |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
♥ ♦ ♣ ♠
Industry Role:
Join Date: Sep 2002
Posts: 10,592
|
![]() Read a book.
__________________
![]() ![]() ![]() "I'm selflessly supporting the common good, but only coincidentally looking out for No.1." |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 | |
Confirmed User
Join Date: Mar 2004
Posts: 455
|
Quote:
![]()
__________________
’ |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
♥ ♦ ♣ ♠
Industry Role:
Join Date: Sep 2002
Posts: 10,592
|
Code:
if(isset($row['url'])){ echo "<a href=".$row['url']." title=".$row['title'].">".$row['name']."</a>"; }else{ echo "$row['name']"; }
__________________
![]() ![]() ![]() "I'm selflessly supporting the common good, but only coincidentally looking out for No.1." |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Join Date: Mar 2004
Posts: 455
|
Thanks, dude!
hmm, it doesn't produce any errors, but it doesn't work.. should i try something other than isset?
__________________
’ |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: Mar 2004
Posts: 455
|
switched around the if and else and tried empty()
that worked! thanks!
__________________
’ |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Join Date: Mar 2004
Posts: 455
|
also: i have a separator between each entry.. is there an if something() to check if it's the last entry, so the separator doesn't show up at the end?
__________________
’ |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Join Date: Mar 2004
Posts: 455
|
it's now 1041
__________________
’ |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
♥ ♦ ♣ ♠
Industry Role:
Join Date: Sep 2002
Posts: 10,592
|
Code:
if($row['url'] != empty){ echo "<a href=".$row['url']." title=".$row['title'].">".$row['name']."</a>"; }else{ echo "$row['name']"; }
__________________
![]() ![]() ![]() "I'm selflessly supporting the common good, but only coincidentally looking out for No.1." |
![]() |
![]() ![]() ![]() ![]() ![]() |