2

Possible Duplicate:
How to wrap long lines without spaces in HTML?

I have a long text "jkjkllllllllljcsccncnmchdkcjhvcjdkvk".how to wrap this text in php

Community
  • 1
  • 1
n92
  • 7,424
  • 27
  • 93
  • 129
  • 2
    You can't really *wrap* text that has no spaces, unless you just pick an arbitrary point and split it. – Orbling May 17 '11 at 11:54

1 Answers1

2

Use this:

<?php
$iamlong = "woooooooooooord.";
$iamwrapped = wordwrap($iamlong , 8, "<br>", true);

echo $iamwrapped;
?>
OM The Eternity
  • 15,694
  • 44
  • 120
  • 182