Re: [PHP] Manipulating strings

2008-10-07 Thread Micah Gersten
Then you'll need this as well: http://us.php.net/manual/en/function.strlen.php **strpos** ( $text , '' , strlen($text)/2 ); Will give you the position. Use str_replace to insert your ad. Thank you, Micah Gersten onShore

Re: [PHP] Manipulating strings

2008-10-07 Thread Ron Piggott
The first question was to find out how long the blog entry was (number of paragraphs.) I am wanting to put an ad in half way. Consequently there are going to be many 's before the one I am wanting to add text to. How should I handle this? Ron On Tue, 2008-10-07 at 20:55 -0500, Micah Gersten

Re: [PHP] Manipulating strings

2008-10-07 Thread Micah Gersten
For the 1st question: http://us.php.net/manual/en/function.substr-count.php For the second question: http://us.php.net/manual/en/function.strpos.php http://us.php.net/manual/en/function.str-replace.php Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Ron Pigg