You are here: Re: Preformatted text with wrap « HTML « IT news, forums, messages
Re: Preformatted text with wrap

Posted by Toby Inkster on 10/21/07 11:19

Joseph Misko wrote:

> str_replace seems to have worked a charm! Before your post, working with
> the text like this had crossed my mind, but I thought it would be too
> laborious. It's simple.

No problem. PHP has some really nice string manipulation functions.
Arguably more powerful than Perl[1] although the syntax is not quite
as easy to use.

____
1. Justification: in PHP, for most string operations (matching, replacing,
splitting, etc) you can choose between Perl-compatible regular expressions,
extended regular expressions, simple strings and so forth. With Perl you
pretty much always have to use regular expressions.

,=======================================================================.
| | matching | replacing | splitting |
|-----------------------------------------------------------------------|
|Simple strings | strstr() | str_replace() | explode() |
|Ditto Case-Ins | stristr() | str_ireplace() | NO SUCH FUNCTION|
|Extended Reg Exp | ereg() | ereg_replace() | split() |
|Ditto Case-Ins | eregi() | eregi_replace() | spliti() |
|Perl-compat Reg Exp | preg_match() | preg_replace() | preg_split() |
`======================================================================='

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация