Jump to content

how to make database item unique


aksdesigns

Recommended Posts

Hey guys,

 

is it possible to do this:

 

I have the database item $title being pulled for the title and the actual clickable part of a link.

 

Is it possible to make the $title in the link title unique?

 

I ask because i'm truncating the clickable text with this code:

 

$maxChars = 28;
		if(strlen($row['album']) > $maxChars) {
			$row['album'] = substr($row['album'], 0, $maxChars - 3);
			$row['album'] .= "...";
		}

 

and the link title shows the truncated version to. If i could make the clickable link or the title $title unique then i could have the full db item for the title and still have it truncated for the clickable text.

 

Anyone know if this is possible?

 

Thanks,

 

Link to comment
https://forums.phpfreaks.com/topic/185090-how-to-make-database-item-unique/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.