Jump to content

[SOLVED] strlen >25 problem


jesushax

Recommended Posts

hi heres my little snippet

 

if ((strlen($row["CompanyName"]) >25)) { $dot = '...';}
	echo substr($row["CompanyName"],0,25)."$dot</a></td>\n";

 

so if the lenght is longer thatn 25 cut it off and write a ... is whats supposed to be happening but its just putting $dot next to all the records :S

Link to comment
https://forums.phpfreaks.com/topic/114077-solved-strlen-gt25-problem/
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.