On Thu, March 8, 2007 11:56 am, Otto Wyss wrote:
From an arry I create a table like
foreach ($persons as $key = $pers) {
echo tdinput name=\K$key\ type=\checkbox\ .../td
td.../td
}
so each checkbox field has its own name created from $key. Yet how can
I
access
On Mon, 2007-03-12 at 19:30 -0500, Richard Lynch wrote:
On Thu, March 8, 2007 11:56 am, Otto Wyss wrote:
From an arry I create a table like
foreach ($persons as $key = $pers) {
echo tdinput name=\K$key\ type=\checkbox\ .../td
td.../td
}
so each checkbox
On Mon, March 12, 2007 7:57 pm, Robert Cummings wrote:
On Mon, 2007-03-12 at 19:30 -0500, Richard Lynch wrote:
On Thu, March 8, 2007 11:56 am, Otto Wyss wrote:
From an arry I create a table like
foreach ($persons as $key = $pers) {
echo tdinput name=\K$key\ type=\checkbox\
From an arry I create a table like
foreach ($persons as $key = $pers) {
echo tdinput name=\K$key\ type=\checkbox\ .../td
td.../td
}
so each checkbox field has its own name created from $key. Yet how can I
access these fields (names) later on?
foreach ($persons as $key =
Actuallyyou're doing it rightyou just need to concatenate.
ex:
echo tdinput *name=\K.$key.\* type=\checkbox\ .../td
and then later you access the values the same way...(you loop on $key and
the value would be K.$key)...
Regards,
Rabih
On 3/8/07, Otto Wyss [EMAIL PROTECTED] wrote:
- Original Message -
From: Otto Wyss [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Thursday, March 08, 2007 5:56 PM
Subject: [PHP] Creating variable names from values
From an arry I create a table like
foreach ($persons as $key = $pers) {
echo tdinput name=\K$key
On 3/8/07, Otto Wyss [EMAIL PROTECTED] wrote:
Satyam wrote:
$key = 'K' . $key;
if ($$key) {
notice double dollar sign, it means, not the value of $key but the value
of
the variable $key says.
Thanks, any idea where this is described in the PHP manual? Searching
for $$ produces no
[EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Thursday, March 08, 2007 8:16 PM
Subject: Re: [PHP] Creating variable names from values
Satyam wrote:
$key = 'K' . $key;
if ($$key) {
notice double dollar sign, it means, not the value of $key but the value
of the variable $key says
Otto Wyss wrote:
From an arry I create a table like
foreach ($persons as $key = $pers) {
echo tdinput name=\K$key\ type=\checkbox\ .../td
Maybe this?
... type=\K[{$key}]\ ...
td.../td
}
so each checkbox field has its own name created from $key. Yet how can I
access
9 matches
Mail list logo