array key characters

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
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

array key characters

Post by Luke »

What characters are allowed for array keys?

Code: Select all

$something['what's allowed in here']
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

a valid string or integer.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

as you can see with the color coding of your first post the second ' i not allowed as it messes things up

mysql_real_escape_string();

will help you out

if you are more worried use regex to make sure all of your variables are proper.
Post Reply