haha,is funny, i like it.
> Date: Wed, 3 Dec 2008 12:40:39 -0800
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]; php-general@lists.php.net
> Subject: Re: [PHP] adding key-> value pair to an array
>
> >
> > //you can get really stupid with this
>
> //you can get really stupid with this..
> ${false} = 'some string here';
> echo ${''};
> //echos some string here
>
I like stupid things
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jim Lucas wrote:
I don't think the above will work either, afaik php doesn't allow you to have variable names start with numbers.
well debatable..
#
$12 = 'value';
Parsing Error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE
or '$'
#
$varname = 12;
Aniketto wrote:
> Hi all,
> Can anybody tell me how can I add key->value pair in an array.
> My code is as follows
>
> $criteria = array();
> $criteria['mail_subject'] = $form->subject->getValue();
> $criteria['delivery_user_name'] = $form->delivery_user_name->getValue();
> $criteria['start_da
Yeti wrote:
>> //for each row I want to add percentage as new key->value pair
>> // but it gives error 'Undefined variable:
>> percentage'
>>$row->$percentage = ($browseCount / $totalCount ) * 100;
>
> Obviously you get the error because $percentage is not d
> //for each row I want to add percentage as new key->value pair
> // but it gives error 'Undefined variable:
> percentage'
>$row->$percentage = ($browseCount / $totalCount ) * 100;
Obviously you get the error because $percentage is not defined ..
I did not
Hi all,
Can anybody tell me how can I add key->value pair in an array.
My code is as follows
$criteria = array();
$criteria['mail_subject'] = $form->subject->getValue();
$criteria['delivery_user_name'] = $form->delivery_user_name->getValue();
$criteria['start_date'] = $form->start_date->getVa
Hi all,
Can anybody tell me how can I add key->value pair in an array.
My code is as follows
$criteria = array();
$criteria['mail_subject'] = $form->subject->getValue();
$criteria['delivery_user_name'] = $form->delivery_user_name->getValue();
$criteria['start_date'] = $form->start_date->getVa
8 matches
Mail list logo