How do we move the line every 50 symbols?



  • Let's say there's this variable:

    $text = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.";
    

    How do we automatically move the line so that there are not more than 50 symbols in the line?



  • Try it.

    $mess = mb_substr($item['mess'], 0, 50, 'UTF-8') . '...';
    

    It is still possible to try through html - to enter the div text and apply a fixed width/high for it.


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2