Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Pulling variables from str_replace
- Brad Everman
September 21, 2006, 2:22 pm
rate this thread
Something simple, perhaps someone can shed some light.
I have an array of paragraphs of text and am replacing some of the text
return("this is graphic $numGraphic");
$instruction = str_replace("#GRAPHIC[$i]",addGraphic($i),$instruction);
Basically, I look for the tag #GRAPHIC[n] in the text where n is an
integer value and want to replace it with the text and the actual number
inside the brackets. I am unsure how to parse this value out and then pass
it to the function that will create the appropriate output.
Thanks for any help.