I may have lost the original problem, but I thought you wanted a way of
displaying the structure of an array hierarchy,
e.g.
$fred[0][0] = array("length"=>10, "width"=>20);
$fred[0][1] = array("length"=>20, "width"=>30);
$fred[0][2] = array("length"=>30, "width"=>20);
$fred[0][3] = "Hello world";
$fred[1] = "another string";

if this isn't what you're trying to do I apologise for misinterpreting the
question

        Tim Ward
        Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html

> -----Original Message-----
> From: Sandeep Murphy [SMTP:[EMAIL PROTECTED]]
> Sent: 22 January 2002 14:42
> To:   'Tim Ward'; PHP List
> Subject:      RE: [PHP] RE: Printing structure and data of array
> 
> 
> nope...
> 
> It continues to print in a single column indexed from 0 to .... It does
> not
> print the sub elements as sub elements.....
> 
> any more ideas???
> 
> regards,
> sands
> -----Original Message-----
> From: Tim Ward [mailto:[EMAIL PROTECTED]]
> Sent: terça-feira, 22 de Janeiro de 2002 12:56
> To: Sandeep Murphy; PHP List
> Subject: RE: [PHP] RE: Printing structure and data of array
> 
> 
> how about ...
> 
> function ShowArray($array)
> {     echo("<ul>");
>       foreach ($array as $key=>$value)
>       {       echo("<li>$key")
>               if (is_array($value))
>               {       ShowArray($value);
>               } else
>               {       echo("=>$value");
>               }
>               echo("</li>")
>       }
>       echo("</ul>");
> } // end of fn ShowArray
> 
> 
>       Tim
>       www.chessish.com
> 
> > -----Original Message-----
> > From:       Sandeep Murphy [SMTP:[EMAIL PROTECTED]]
> > Sent:       22 January 2002 12:01
> > To: 'Tim Ward'; PHP List
> > Subject:    RE: [PHP] RE: Printing structure and data of array
> > 
> > hi,
> > 
> > how can I display the array exactly as it is the format specified???
> like
> > if
> > their exists sub elements of elements, how could I represent them in a
> > multidimensional format??
> > 
> > I went thru most of the array functions but unable to adapt any of
> them..
> > 
> > pl help..
> > 
> > TIA,
> > sands
> > 
> > -----Original Message-----
> > From: Tim Ward [mailto:[EMAIL PROTECTED]]
> > Sent: segunda-feira, 21 de Janeiro de 2002 10:24
> > To: PHP List; Daniel Alsén
> > Subject: [PHP] RE: Printing structure and data of array
> > 
> > 
> > Foreach($array as $key=>$value) ech0("$key=>$value<br>");
> > 
> > Tim
> > www.chessish.com <http://www.chessish.com> 
> > 
> >     ----------
> >     From:  Daniel Alsén [SMTP:[EMAIL PROTECTED]]
> >     Sent:  20 January 2002 19:33
> >     To:  PHP List
> >     Subject:  Printing structure and data of array
> > 
> >     Hi,
> > 
> >     i know i have this answered before. But i can´t find that mail in
> > the
> >     archive.
> > 
> >     How do i print an array to see both the structure and the data
> > within?
> >     ("test" => "value", "test2" => "value2")...
> > 
> >     # Daniel Alsén    | www.mindbash.com #
> >     # [EMAIL PROTECTED]  | +46 704 86 14 92 #
> >     # ICQ: 63006462   | +46 8 694 82 22  #
> >     # PGP: http://www.mindbash.com/pgp/  #
> >     
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to