|
-
Apr 7th, 2002, 10:07 AM
#1
Thread Starter
Hyperactive Member
CAPITAL or small
This code:
1: $MESSAGE = "(img)http://site.con/photo.gif(/img)";
2: $MESSAGE = str_replace("(IMG)", "<IMG src='", $MESSAGE);
3: $MESSAGE = str_replace("(/IMG)", "'>", $MESSAGE);
4: $MESSAGE = str_replace("(img)", "<IMG src='", $MESSAGE);
5: $MESSAGE = str_replace("(/img)", "'>", $MESSAGE);
to replace (img)http://site.con/photo.gif(/img) to HTML img code, and I repeat line 2,3
because may be user right (IMG) Capital or small.
Qusetion : There are any function to replace string to another string if this string capital
or small untill I do not repeat the code.
Last edited by prokhaled; Apr 7th, 2002 at 10:11 AM.
-
Apr 7th, 2002, 11:05 AM
#2
use eregi_replace instead of str_replace
-
Apr 7th, 2002, 02:36 PM
#3
See my other post regarding BB code.
-
Apr 7th, 2002, 03:04 PM
#4
Thread Starter
Hyperactive Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|