[IMG1]
- Started
- Last post
- 2 Responses
- JamesEStone
What would the PHP command be if I wanted to replace the piece of text [IMG1] with...
include ("imageDraw.php?I=1);
or [IMG7] with include ("imageDraw.php?I=7); for example?
Any help would be much appreciated... preg_replace is a bit of a nightmare to me!
- cosmo0
you can use "str_replace ()" function.
http://us2.php.net/str_replace
I noticed you are passing a variable in the include statement in this manner:
include ("imageDraw.php?I=1) ;
why are you doing this? all variables are automatically passed to the include files.
$i = 1;
include ("imageDraw.php");$i in this case you would be accessible to the include file. the method you are using right now, is absoultely wrong. Just pointing that out.
- JamesEStone0
I want to take the number out of the tag and parse it as the string I showed... so that I cna let editors easily use inline imagery.