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 "
>> >...
>> >
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 "
> >...
> >}
> >
> > so each checkbox field has its own name created fro
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 "
>...
>}
>
> so each checkbox field has its own name created from $key. Yet how can
> I
> access these fields (names) later on?
>
>for
Otto Wyss wrote:
From an arry I create a table like
foreach ($persons as $key => $pers) {
echo "
Maybe this?
... type=\"K[{$key}]\" ...
...
}
so each checkbox field has its own name created from $key. Yet how can I
access these fields (names) later on?
how OR where ar
rom: "Otto Wyss" <[EMAIL PROTECTED]>
To:
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 th
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 "$$" pr
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 results.
O. Wyss
--
PHP General Mailing List
- Original Message -
From: "Otto Wyss" <[EMAIL PROTECTED]>
To:
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 "
...
}
Actuallyyou're doing it rightyou just need to concatenate.
ex:
echo "
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:
From an arry I create a table like
fore
From an arry I create a table like
foreach ($persons as $key => $pers) {
echo "
...
}
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 => $pers) {
if ($K???) {
$cnt += 1; ...
10 matches
Mail list logo