-1

The variable $rowad["1site"] is a URL. How could I keep the entire URL in the hyperlink, but have the anchor text be an edited version of the URL, showing nothing after the TLD?

echo '<td style="" class="pointlink"><span class="pointlink"><a href="http://'.$rowad["1site"].'">'.$rowad["1site"].'</a></td>'; 
1
  • I know you got your solution from a similar question you posted (stackoverflow.com/questions/12253953/…) But is there any chance you could give feedback on this question to help other in future. Thanks Commented Sep 5, 2012 at 11:20

1 Answer 1

0

You can explode the URL, something like:

$newUrl = explode('/', $rowad['1site']); 

Then add $newUrl[0] where you want.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.