php使用特殊符号

<?php do { ?>
     <?php echo "<a href=\"".$row_pageDetails['website']."\">"; ?><?php echo $row_pageDetails['name']; ?>(<?php echo $row_pageDetails['profile']; ?>)  </br> </a>  
<?php } while ($row_pageDetails = mysql_fetch_assoc($rspageDetails)); ?> 

This gives a clickable link name(profile) but if the profile is empty It shows () how can I improve it so that when the profile record is empty it shows nothing.

instead of

(<?php echo $row_pageDetails['profile']; ?>)

use ternary operator

<?php echo ($row_pageDetails['profile']) ? '('.$row_pageDetails['profile'].')' : ''; ?>

Your code must be something like this

<?php do {
 echo (isset($row_pageDetails['profile']) && !empty($row_pageDetails['profile']))? 
 '<a href="'.$row_pageDetails['website'].'">'.$row_pageDetails['name'].'('.$row_pageDetails['profile'].')</a>':''; } while ($row_pageDetails = mysql_fetch_assoc($rspageDetails)); ?> 

You have many unnecessary opening and closing php tags. You should only use one for this whole thing given your code.

And you have a mis-closed </br> tag, should be <br/> and it would be better if you put it after the closing anchor tag.

You can not show the link at all by putting the whole thing in an if statement

<?php
     do {
       if(!empty($row_pageDetails['profile'])){
         echo "<a href=\"$row_pageDetails[website]\">";
         echo $row_pageDetails['name'] . "($row_pageDetails[profile])</a><br/>";
       }
     } while ($row_pageDetails = mysql_fetch_assoc($rspageDetails));
?>