
Wordwrap your text
Here the function that comes under php i.e wordwrap(). You can use it for wrapping you long string text into multiple lines and easy to read.
Following are the code that help you. Copy and paste the code into your editor save the code as php file and run into you browser.
<?php
// string to be wrapped into multiple lines
// change the text according your requirement
$text = “Word wrap will split this text up into smaller lines, which makes for easier reading and neater layout.” ;
// function will wrapped the string after 20 characters
$text = wordwrap($text, 20, “<br />”);
// print wrapped string
print $text;
?>
Shashi Dhar Kumar Experience in Web/software development including client server and implementation using PHP, XML, MySQL and SQL Server. Experience of working on Apache, Linux projects, Javascript, Ajax, Putty, FTP, Remote Connection, XML parsing, Mod-Rewriting, Payment Gateways and shipping modules, Trouble shooting and Manual Testing.
No comments