Error Php shorten text function, need correction -


i'm not sure i'm missing.

i've try looking @ syntax , miss spelling function name

but seems can't find problems

the problem come line 4 coding

<?php      function shortentext($text, $maxlength=70, $appendix = "..."){         $text = strip_tags($text);         if(mb_strlen($text) <= $maxlength){return $text;}          $text = mb_substr($text, 0, $maxlength - mb_strlen($appendix));         $text =. $appendix;         return $text;     }  } 

you closed twice function , have put =. instead of .= use ide, underline errors...

function shortentext($text, $maxlength=70, $appendix = "...") {     $text = strip_tags($text);     if(mb_strlen($text) <= $maxlength){return $text;}      $text = mb_substr($text, 0, $maxlength - mb_strlen($appendix));     $text .= $appendix;     return $text; } 

Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -