Re: [PHP] strange problem

2002-01-18 Thread Marc Logghe
what the heck !? I would never think on that but you are absolutely right. It all worked again after replacing straights with curlies. Is PHP going the perl way ? Thanks a million for this tip. Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For

[PHP] strange problem

2002-01-18 Thread Marc Logghe
Hi, my PHP (PHP Version 4.1.1) suddenly does not take this anymore: $a['color'] = 'red'; I get this error: Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' when I remove the quotes around the key, it works. Problem is , that a certain key is "%coding" (I know, I kn

[PHP] Re: unshift a key value pair

2002-01-09 Thread Marc Logghe
. Thanks for your fast response Marc "Cc Zona" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (Marc Logghe) wrote: > > > So it is really easy to *remove* a key-value pa

Re: [PHP] unshift a key value pair

2002-01-09 Thread Marc Logghe
> > > Regards, > Andrey Hristov > ----- Original Message - > From: "Marc Logghe" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, January 09, 2002 10:55 AM > Subject: [PHP] unshift a key value pair > > > > Hi, > > I

[PHP] unshift a key value pair

2002-01-09 Thread Marc Logghe
Hi, I was wondering how you could unshift a key value pair onto an array. In the manual one suggested using a function like this: function array_unshift_assoc(&$arr, $key, $val) { $arr = array_reverse($arr, true); $arr[$key] = $val; $arr = array_reverse($arr, true); return count($a