View Single Post
Old 02-21-2013, 08:06 PM   PM User | #3
DJ Hands3
New Coder

 
Join Date: Feb 2009
Posts: 90
Thanks: 5
Thanked 0 Times in 0 Posts
DJ Hands3 is an unknown quantity at this point
Hi mlseim,

Sorry I will try and explain better,

When writing a blog on my site, specific text changes through regex to show such a smiley image when : ) is typed.

I wanted to type [poll1] and this would be replaced with:

PHP Code:
<iframe width="100%\" src=\"blog-poll.php?pollid=$id\" scrolling=\"no\" id=\"the_iframe\" onLoad=\"calcHeight();\" height=\"1px\" frameborder=\"0\" ></iframe> 
The blog post is contained as a string within $message, I wanted to use regex to replace that part of the string where [poll1] is found or what ever number is within the brackets where poll and the enclosed brackets are found to change with the above.

At the same time the number after poll would be assigned to the variable $id to display the correct poll from blog-poll.php

The above method maybe long winded, but this is what I was trying to explain in the previous post.
DJ Hands3 is offline   Reply With Quote