Web Languages and Standards
--
Questions
--
Followers
Top Experts
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
I do not think that it can be done.
Just curious why do not you do this
<a href = "very very long url">Short name</a>
If url is very long no body will write it down but will copy it which can be still done using write click or when they click and this page is open.
Regards,
---Pinal






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
The data is not only urls, also contains other words. Urls are not always part of the data.
<?php
any other data actions
$ShortName=SHortNAmeHere
$URL=Url-Goes-here
echo "<a href=".$URL.">".$ShortName
?>
I assume you are probably using SQL querys and retreving all the data try:
Assuming result is the result of the query
<?php
#All the databse crap
while($line=mysql_fetch_ro
{
#Data Functions
#this assumes column 1 is the URL and column 2 is the short name u want for it.
$ShortName=$line[1];
$URL=$line[0];
echo "<a href=".$URL.">".$ShortName
}
?>
"Howdy People! Â My website is http://www.mytestsite.com"
But it won't wrap when it comes to the url. Â And, to finish up my comment, here's what you need to use:
$message_wrapped = wordwrap($message, 30, "\n", 1);
See http://us2.php.net/wordwrap
CoolATIGuy

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
apply this style to the td taqs:
<td style="width:100px;overflo
It still won't break the line to wrap it, but it will truncate the data instead of pushing out the cell width. Â Set the with to whatever you need in pixels.
Cd&
So the net effect is you put the content in a nobr tag to tell it to never insert a line break, and then insert  a wbr tag to tell it you changed your mind and you want it to break, and it is ignored by standards compliant browsers; with no guarantee it will contiue to have support in future releases of IE which is the only browser still supporting it. Â
Probably not a good idea.
Cd&






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
Cd&
Web Languages and Standards
--
Questions
--
Followers
Top Experts
Web development can range from developing the simplest static single page of plain text to the most complex web-based internet applications, electronic businesses, and social network services using a wide variety of languages and standards, including the familiar HTML, JavaScript and jQuery, ASP and ASP.NET, PHP, ColdFusion, CSS, PHP, Flex and Flash, but also the implementation of a broad list of standards including XML, WSDL, SSDL, VoiceXML and many more.