![]() |
Trouble using eval()
I am trying to write a script that uses eval() to parse vBulletin variables and phrases from a string. However, I get a parse error if the string contains a colon : and probably if I tried a semicolon ; as well.
Is there a way to escape the colons with a function such as addslashes()? How do I get around this? |
They don't need to be escaped. Can you post your code?
|
Okay I got around escaping the colons. But here's what I'm trying to do:
The user enters a string containing a list of variables in an input field. These variables then need to be interpreted as globals, but the following oh so simple code won't work: PHP Code:
EDIT: Never mind. Although this would be nice to know for the future, I decided against user-entered globals this time around. |
Wouldn't you use
PHP Code:
|
Got it working.
PHP Code:
|
All times are GMT. The time now is 10:17 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:
|