![]() |
find and remove text from string
I have a textarea where the admin can enter a string.
If the admin types "[7]" into the text area I'd like to use a code to remove the brackets so the result would be "7". I could do a simple str_replace if I knew the value was going to be "[7]" but there's no guarantee it will be. |
Try preg_replace() instead.
PHP Code:
|
I have to leave soon so I'll try it later today.
|
Thanks, it works.
|
All times are GMT. The time now is 11:10 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|