Jochem Maas wrote:
$file = $array[0][file];
$path = $array[0][path];
$year = $array[0][year];
$month = $array[0][month];
$day = $array[0][day];
$hhmm = $array[0][hhmm];
where the are your quotes for the array keys? have an E_NOTICE or six.
I was typing fast and
Ashley M. Kirchner wrote:
>
>I have an array that looks like this:
>
>[hours] => Array
>(
>[0] => Array
>(
>[file] => capture.0400.jpg
>[path] => spool/.2006/11/17/04
>[year] => 2006
>
On Fri, 2006-11-17 at 09:23 -0700, Ashley M. Kirchner wrote:
> I have an array that looks like this:
>
> [hours] => Array
> (
> [0] => Array
> (
> [file] => capture.0400.jpg
> [path] => spool/.2006/11/17/04
>
Is there a way that I can simply loop through each array and convert
the keys into variables? I want to avoid having to write lines of:
Look into extract().
http://us3.php.net/manual/en/function.extract.php
thnx,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit
At 03:37 26.06.2003, John Wulff said:
[snip]
>I've got an array in the following format:
>Array ( [Jan-1999] => 36.04,140.35,319.53,324.07 [Feb-1999] =>
>1.78,71.78,320.58,141.97 )
>
>I need it in the following format:
>$example_data = array(
>array("Feb-
On Wed, 25 Jun 2003 18:37:02 -0700, you wrote:
>I've got an array in the following format:
>Array ( [Jan-1999] => 36.04,140.35,319.53,324.07 [Feb-1999] =>
>1.78,71.78,320.58,141.97 )
Assuming that I've interpreted your array structure correctly,
$a = array ("Jan-1999" => array (36.04,140
what about (untested)?
$example_data = array();
foreach ($blah_array as $key=>$value)
{
$example_data[] = array($key, $value);
}
-Original Message-
From: John Wulff [mailto:[EMAIL PROTECTED]
Sent: Thursday, 26 June 2003 11:37 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Converting Array
I'
7 matches
Mail list logo