![]() |
preg_replace $var['foo'] with $var[foo]
How can I remove the quotes in an array using preg_replace?
I want $var['foo'] to be $var[foo]. |
Quote:
I assume this is some string representation of code going to eval somewhere? otherwise you are probably asking the wrong question. Do you want to replace all instances of ' or just those in [ ] ? Since there is no ambiguity in your expression I would suggest using str_replace, it's a lot faster. mixed str_replace ( mixed $search, mixed $replace, mixed $subject [, int &$count] ) A bit more context as to what you are trying to do would help. |
The problem is with my "Advanced BBCode" hack. It's that last post on the first page.
|
All times are GMT. The time now is 11:57 PM. |
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:
|