php word wrap function


/ Published in: PHP
Save to your folder(s)

it already exists in php


Copy this code and paste it in your HTML
  1. $text = "A very long woooooooooooord.";
  2. $newtext = wordwrap($text, 8, "\n", true);
  3.  
  4. echo "$newtext\n";

URL: http://www.barattalo.it/

Report this snippet


Comments


You need to login to view comments.