RE: [PHP-DB] me noob. link if else.. help.

From: Date: Tue, 13 May 2003 18:19:44 +0000
Subject: RE: [PHP-DB] me noob. link if else.. help.
Groups: php.db 
Request: Send a blank email to php-db+get-27711@lists.php.net to get a copy of this message
First off, the line echo "<a href="$row_rsViewLinks['linksLink']"$row_rsViewLinks['linksName']</a>;" needs to look more like echo "<a href=\"$row_rsViewLinks['linksLink']\"$row_rsViewLinks['linksName']</a>;" or echo ' <a href="' . $row_rsViewLinks['linksLink'] . '"' . $row_rsViewLinks['linksName'] . '</a> '; And you should use the NOT operator for the if statement: if (! $row_rsViewLinks['linksLink']){ echo $row_rsViewLinks['linksName']; } else { echo ' <a href="' . $row_rsViewLinks['linksLink'] . '"' . $row_rsViewLinks['linksName'] . '</a> '; } > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.db (#27711) next »