On 25 Apr 2008, at 14:12, jamest wrote:
I am passing an array to a class which I want to take the array data
and
create some variables from the array's keys and values.
So I want to create (in this case 21) new variables that I want to
create in
the foreach but with no success.
foreach
On Fri, 2008-04-25 at 06:12 -0700, jamest wrote:
I am passing an array to a class which I want to take the array data and
create some variables from the array's keys and values.
So I want to create (in this case 21) new variables that I want to create in
the foreach but with no success.
On Apr 25, 2008, at 6:12 AM, jamest [EMAIL PROTECTED] wrote:
I am passing an array to a class which I want to take the array data
and
create some variables from the array's keys and values.
So I want to create (in this case 21) new variables that I want to
create in
the foreach but with
Thats perfect. I didn't even know about this.
Stut wrote:
$$key = $value;
They're called variable variables - search the manual for that term
for more info.
-Stut
--
http://stut.net/
--
View this message in context:
jamest wrote:
I am passing an array to a class which I want to take the array data and
create some variables from the array's keys and values.
So I want to create (in this case 21) new variables that I want to create in
the foreach but with no success.
foreach ($formdata as $key = $value) {
Yes, tested and verified. It was the accelerator. They have multiple
binaries, one for each version of PHP. Matching the new binary to the
new version of PHP solved this problem.
Thanks again.
Larry
On Tue, 2005-08-23 at 20:35, Larry Brown wrote:
Sorry, that last one went out without a
-Original Message-
From: Larry Brown
To: php
Sent: 23/08/05 02:28
Subject: [PHP] foreach loop changed after 4.3 - 4.4 upgrade
I had a foreach loop working on an array as such:
$multiarray = array(array('person','person'),array('another','another'))
the array was put through
Larry Brown wrote:
I found that the only way to get the function to behave is to add the
key...
foreach($multiarray as $key=$subArray)
Now it displays as it previously did where $subArray is concerned. Is
there something I'm missing here? Was I the only person not using
keys?
[snip]
I switched from 4.3 to 4.4 on a server with a huge web application using
both foreach loops with and without the keys.. No problem whatsoever..
Evert
Larry Brown wrote:
I found that the only way to get the function to behave is to add the
key...
foreach($multiarray as $key=$subArray)
Now
turck-mmcache?
t
Edward Vermillion wrote:
Larry Brown wrote:
I found that the only way to get the function to behave is to add the
key...
foreach($multiarray as $key=$subArray)
Now it displays as it previously did where $subArray is concerned. Is
there something I'm missing here? Was I
On Tue, 2005-08-23 at 05:30, Ford, Mike wrote:
-Original Message-
From: Larry Brown
To: php
Sent: 23/08/05 02:28
Subject: [PHP] foreach loop changed after 4.3 - 4.4 upgrade
I had a foreach loop working on an array as such:
$multiarray =
Sorry, that last one went out without a comment. I think this is most
likely the cause. I haven't dug back into it yet to verify, but it
makes the most sense.
Thanks everyone...
Larry
On Tue, 2005-08-23 at 05:30, Ford, Mike wrote:
-Original Message-
From: Larry Brown
To: php
Sent:
I found that the only way to get the function to behave is to add the
key...
foreach($multiarray as $key=$subArray)
Now it displays as it previously did where $subArray is concerned. Is
there something I'm missing here? Was I the only person not using
keys?
On Mon, 2005-08-22 at 21:28, Larry
Got it fixed. Never mind.
Thanks
At 10:49 PM 6/13/2003, CDitty wrote:
I have a foreach loop in a while loop that retrieves information from my
database. The foreach loop works fine if there is data in the database
for that loop. But if nothing is found in the database, I get a Invalid
actually the logic is follow:
every array has a key, therefore, you use:
foreach($variables as $key = $value) {
$variables[$key] = strip_tags($value);
$variables[$key] = AddSlashes($value);
}
where you get an array element with whatever key it uses, work on it's value
If we didn't have Microsoft, we'd have to blame ourselves for all of our
programs crashing
I really don't think so
:-)
-maxim maletsky
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To
At 10:31 AM -0700 7/7/01, John Meyer wrote:
When I go through a foreach loop, are the values of the individual
items in the array changed?
For instance:
$variables = array($author_firstname, $author_lastname, $author_dob,
$author_dod, $author_bio);
foreach($variables as $value) {
If we didn't have Microsoft, we'd have to blame ourselves for all of our
programs crashing
If we didn't have microsoft, 'Crashing Programs' wouldn't be part of our
daily vocabulary :)
__John Monfort_
_+---+_
P E P I E D E S I
Good call
- Original Message -
From: John Monfort [EMAIL PROTECTED]
To: PHPBeginner.com [EMAIL PROTECTED]
Cc: John Meyer [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Saturday, July 07, 2001 6:27 PM
Subject: RE: [PHP] foreach loop
If we didn't have Microsoft, we'd have to blame
19 matches
Mail list logo