Solved

Wordwap at character instead of #?

Posted on 2007-04-02
2
228 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
Comment Utility
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
Comment Utility
$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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now