Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Wordwap at character instead of #?

Posted on 2007-04-02
2
243 Views
Last Modified: 2007-04-02
Is it possible to do something like wordwrap, but inserting a new line after a certain character (in my case: >), instead of after a certain number of characters?
0
Comment
Question by:n00b0101
2 Comments
 
LVL 67

Accepted Solution

by:
sirbounty earned 500 total points
ID: 18840428
Hello n00b0101,
replace the character with a chr(13) & chr(10) - equivalent to a carriage return and line feed.

~sirbounty
0
 
LVL 19

Expert Comment

by:BrianGEFF719
ID: 18840483
$theString = "This is a simple>Test of replacing a less than with a >New Line and a less than";

$theString = str_replace( ">", ">\n", $theString );
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Wordpress French and English Site 6 77
php56-php-mcrypt for rhel7 php56 1 50
How to set the Tinymce Editor image path 4 22
AJAX Wordpress Not Reading Variable 2 27
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question