I'm trying to write a function that will display the full contents of an
array. If one of the keys contains a value that is an array, the full
array (all indices) should be shown.
As an example, given the following definitions:
$Arr1[1] = Apple;
$Arr1[2] = Banana;
$Arr1[3] = $Arr2[];
, Pear);
$arr3 = array($arr, $arr2);
printArray($arr3);
Debbie
- Original Message -
From: Brad Harriger [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 26, 2002 6:50 PM
Subject: [PHP] Displaying full array contents
I'm trying to write a function that will display
);
Debbie
- Original Message -
From: Brad Harriger [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 26, 2002 6:50 PM
Subject: [PHP] Displaying full array contents
I'm trying to write a function that will display the full contents of an
array. If one of the keys
, September 26, 2002 8:46 PM
Subject: Re: [PHP] Displaying full array contents
Debbie,
Yes. I could use recursion, but what's really hanging me up is keeping
track of how deep into an array I am. It should be fairly simple, but I
seem to be having a brain freeze.
Brad
Debbie_dyer wrote
$arr3 = array($arr, $arr2);
printArray($arr3);
Debbie
- Original Message -
From: Brad Harriger [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 26, 2002 6:50 PM
Subject: [PHP] Displaying full array contents
I'm trying to write a
Subject: Re: [PHP] Displaying full array contents
print_r($array); simply print out the entire array..
It cant be easier.
Debbie_dyer [EMAIL PROTECTED] wrote in message
01bf01c26598$1d84ec00$0100a8c0@homepc">news:01bf01c26598$1d84ec00$0100a8c0@homepc...
Use a static variable in the
: [PHP] Displaying full array contents
Easier yes and ok for debug but it doesnt look very nice on a web page does
it nor does it help if you want to do something with the array elements.
Debbie
- Original Message -
From: Martin W Jørgensen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent
It's a slightly different format, but print_r($array) recursively echo the
contents of an array ina readable format?
http://php.net/print_r
Why reinvent the wheel, unless you need that specific format.
HTH
Justin
on 27/09/02 3:50 AM, Brad Harriger ([EMAIL PROTECTED]) wrote:
I'm trying
8 matches
Mail list logo