How to print a multidimensional associative array?

This is a discussion on How to print a multidimensional associative array? within the PHP Language forums, part of the PHP Programming Forums category; On Wed, 16 Feb 2005 03:03:42 -0800, Leonardo wrote: >> A little ugly, but: > > ... it ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 02-16-2005
JDS
 
Posts: n/a
Default Re: How to print a multidimensional associative array?

On Wed, 16 Feb 2005 03:03:42 -0800, Leonardo wrote:

>> A little ugly, but:

>
> ... it works! Thank you.


But ugly is bad in the long run. Works now, yes... but how about later,
when you want to change, add, debug, or modify the thing?

Matt Mitchell's example is way better.

--
JDS | jeffrey@example.invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/

Reply With Quote
  #12 (permalink)  
Old 02-16-2005
JDS
 
Posts: n/a
Default Re: How to print a multidimensional associative array?

On Wed, 16 Feb 2005 00:43:28 +0000, Matt Mitchell wrote:

> OK, I give up - here's the fish.


Awww... you gave up too easily.

--
JDS | jeffrey@example.invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/

Reply With Quote
  #13 (permalink)  
Old 02-16-2005
Matt Mitchell
 
Posts: n/a
Default Give a man a fish...


"JDS" <jeffrey@example.invalid> wrote in message
news:pan.2005.02.16.14.50.29.322406@example.invali d...
> On Wed, 16 Feb 2005 00:43:28 +0000, Matt Mitchell wrote:
>
>> OK, I give up - here's the fish.

>
> Awww... you gave up too easily.
>


"Give a man a fish, and you feedcx him for a day; teach a man how to fish,
and you feed him for life."

I heard a much much better version the other day:

"Give a man a hot meal, and you'll keep him warm for an hour. Set a man on
fire, and you'll keep him warm for the rest of his life."

Somehow it sprang to mind when I was reading this thread...

Matt


Reply With Quote
  #14 (permalink)  
Old 02-16-2005
JDS
 
Posts: n/a
Default Re: Give a man a fish...

On Wed, 16 Feb 2005 16:37:58 +0000, Matt Mitchell wrote:

> "Give a man a fish, and you feedcx him for a day; teach a man how to fish,
> and you feed him for life."


Actually, I got it. Thanks.

<http://groups-beta.google.com/group/alt.php/browse_frm/thread/b199404da0add7bb/fccd3327a22daa06?q=jeffrey@jhu.edu+OR+jeffreypants @jhu.edu+OR+jeffrey@go.away.com+OR+jeffrey@pantsjh u.edu&_done=%2Fgroups%3Fq%3Djeffrey@jhu.edu+OR+jef freypants@jhu.edu+OR+jeffrey@go.away.com+OR+jeffre y@pantsjhu.edu%26start%3D0%26scoring%3Dd%26hl%3Den %26ie%3DUTF-8%26oe%3DUTF-8%26safe%3Doff%26&_doneTitle=Back+to+Search&&d#fcc d3327a22daa06>

--
JDS | jeffrey@example.invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/

Reply With Quote
  #15 (permalink)  
Old 02-16-2005
Matt Mitchell
 
Posts: n/a
Default Re: Give a man a fish...


"JDS" <jeffrey@example.invalid> wrote in message
news:pan.2005.02.16.16.45.43.772940@example.invali d...
> On Wed, 16 Feb 2005 16:37:58 +0000, Matt Mitchell wrote:
>
>> "Give a man a fish, and you feedcx him for a day; teach a man how to
>> fish,
>> and you feed him for life."

>
> Actually, I got it. Thanks.
>


I know you got it - just thought you might find the alternative version
amusing!...

<g>

Matt


Reply With Quote
  #16 (permalink)  
Old 02-16-2005
gumshoo3@yahoo.com
 
Posts: n/a
Default Re: Give a man a fish...

With respect then to curiosity, the teacher has usually more to learn
than to teach. Rarely can he aspire to the office of kindling or
even increasing it. His task is rather to keep alive the sacred spark
of wonder and to fan the flame that already glows. His problem is to
protect the spirit of inquiry, to keep it from becoming blasé from
overexcitement, wooden from routine, fossilized through dogmatic
instruction, or dissipated by random exercise upon trivial things.

http://spartan.ac.brocku.ca/~lward/D...ey_1910_c.html

Reply With Quote
  #17 (permalink)  
Old 02-16-2005
Matt Mitchell
 
Posts: n/a
Default Re: Give a man a fish...


> <gumshoo3@yahoo.com> wrote in message
> news:1108577375.699140.71360@c13g2000cwb.googlegro ups.com...
> With respect then to curiosity, the teacher has usually more to learn
> than to teach. Rarely can he aspire to the office of kindling or


The student has much to learn if he is not prepared to work on the problem
himself

> even increasing it. His task is rather to keep alive the sacred spark
> of wonder and to fan the flame that already glows. His problem is to


I would imagine that someone posessed of the "scared spark of wonder" would
have been prepared to try *reading* the excellent instructions and examples
that are avaiable free on php.net, to discover the answer he needed

> protect the spirit of inquiry, to keep it from becoming blasé from
> overexcitement, wooden from routine, fossilized through dogmatic
> instruction, or dissipated by random exercise upon trivial things.


Does "dogmatic instruction" include just giving someone the answer, rather
than teaching him how to solve the problem class himself?

Why is it that I was able to answer his question because I learnt how PHP
handles arrays by reading the docs, and yet he is unable to read the same
docs himself, but rather prefers to let other people do the work for him?

Matt



Reply With Quote
  #18 (permalink)  
Old 02-16-2005
Geoff Berrow
 
Posts: n/a
Default Re: Give a man a fish...

I noticed that Message-ID:
<1108577375.699140.71360@c13g2000cwb.googlegroups. com> from
gumshoo3@yahoo.com contained the following:

>With respect then to curiosity, the teacher has usually more to learn
>than to teach. Rarely can he aspire to the office of kindling or
> even increasing it. His task is rather to keep alive the sacred spark
>of wonder and to fan the flame that already glows. His problem is to
>protect the spirit of inquiry, to keep it from becoming blasé from
>overexcitement, wooden from routine, fossilized through dogmatic
>instruction, or dissipated by random exercise upon trivial things.


Bloody hell, I definitely don't get paid enough then...

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Reply With Quote
  #19 (permalink)  
Old 02-16-2005
Jerry Stuckle
 
Posts: n/a
Default Re: Give a man a fish...

Matt Mitchell wrote:
>
> "JDS" <jeffrey@example.invalid> wrote in message
> news:pan.2005.02.16.14.50.29.322406@example.invali d...
> > On Wed, 16 Feb 2005 00:43:28 +0000, Matt Mitchell wrote:
> >
> >> OK, I give up - here's the fish.

> >
> > Awww... you gave up too easily.
> >

>
> "Give a man a fish, and you feedcx him for a day; teach a man how to fish,
> and you feed him for life."
>
> I heard a much much better version the other day:
>
> "Give a man a hot meal, and you'll keep him warm for an hour. Set a man on
> fire, and you'll keep him warm for the rest of his life."
>
> Somehow it sprang to mind when I was reading this thread...
>
> Matt


"Give a man a fish, and you feed him for a day. Teach him to fish, and
he'll spend all his money on beer and bait."

--

To reply, delete the 'x' from my email
Jerry Stuckle,
JDS Computer Training Corp.
jstucklex@attglobal.net
Member of Independent Computer Consultants Association - www.icca.org
Reply With Quote
  #20 (permalink)  
Old 02-16-2005
gumshoo3@yahoo.com
 
Posts: n/a
Default Re: Give a man a fish...

You were able to answer out of guilt of having recieved all this free
stuff off the internet. He has not yet felt the burden of having
recieved all the free stuff...

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 10:33 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0