hi,
I need to write an IF statement to say IF the length of string of text is more than 34 chars then add '...' to the end
here is my code which restricts my text string to 34 chars
here is my attempt of the IF statement
I need to write an IF statement to say IF the length of string of text is more than 34 chars then add '...' to the end
here is my code which restricts my text string to 34 chars
PHP Code:
substr($row1['appliance_fault'],0,34)
PHP Code:
if(substr($row1['appliance_fault'],0,34) <= '34'){
echo substr($row1['appliance_fault'],0,34).'...';
}
Comment