Publishing a variable with comma's in it

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Monotoko
Forum Commoner
Posts: 64
Joined: Fri Oct 26, 2007 4:24 pm

Publishing a variable with comma's in it

Post by Monotoko »

Hiya guys, needing some help, basically, on the admin panel of this program i am working on, it asks for a bit of code for an Opt-In box, then it saves the code into a variable, then publishes that code later when you are on the page.

Now, my problem is that the entire thing dies if there are any " involved...so i was wondering if there was a way to parse these before i put them in the variable?

thank you
~Monotoko
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Publishing a variable with comma's in it

Post by requinix »

Without offering any code best I can suggest is to use addslashes.
Post Reply