Bug #14160 Updated: associative arrays - cannot use exclamation mark in key!

From: Date: Wed, 21 Nov 2001 15:15:34 +0000
Subject: Bug #14160 Updated: associative arrays - cannot use exclamation mark in key!
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-71228@lists.php.net to get a copy of this message
ID: 14160 User updated by: davidfelton@codemasters.com Reported By: davidfelton@codemasters.com Old Status: Feedback Status: Open Bug Type: Arrays related Operating System: Windows 2000 PHP Version: 4.0.6 New Comment: $translations=Array(); $translations["Register Now for Free!"]="¡Regístrate ya gratis!"; echo $translations["Register Now for Free!"]; will print nothing, or an error about undefined index, depending on your error settings in php.ini. As I said before, removing the exclamation mark in the key fixes the problem. Previous Comments: ------------------------------------------------------------------------ [2001-11-21 10:08:25] mfischer@php.net Works for me on 4.0.6 , Linux. Please give the shortest reproduceable script. Feedback. ------------------------------------------------------------------------ [2001-11-21 10:04:02] davidfelton@codemasters.com if you have an array where the key is a string like $arrayname["a string here!"]. You will not be able to pull the value for that key from the array. Removing the exclamation mark in the key fixes this bug. ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=14160&edit=1

« previous php.dev (#71228) next »