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,116
  • 27
  • 91
  • 128
  • 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
  • 14,916
  • 40
  • 117
  • 180