You are here: How to split string around textarea tags? « PHP Programming Language « IT news, forums, messages
How to split string around textarea tags?

Posted by nubster21 on 01/04/08 22:05

I would like to split a string of HTML output into an array on
textarea tags. Example:

<div>Hello this is my content <textarea>foo</textarea> and this is
also
content <b>some bold text</b> <textarea>bar and so forth...</textarea>
here my final content.</div>

The output should be:

Array(
0 => <div>Hello this is my content
1 => <textarea>foo</textarea>
2 => and this is also content <b>some bold text</b>
3 => <textarea>bar and so forth...</textarea>
4 => here my final content.</div>
);

I am fairly new to PHP, so I've been browsing php.net and found some
usefull functions, including strstr, explode and str_split but don't
know how to combine these into a working function. Could anybody
please help me on my way? Your help is appreciated!

 

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

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