FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Displaying an array value in two columns
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Displaying an array value in two columns [message #185850 is a reply to message #185849] Mon, 12 May 2014 19:27 Go to previous messageGo to previous message
Ben Bacarisse is currently offline  Ben Bacarisse
Messages: 82
Registered: November 2013
Karma:
Member
"Dan Jacobs" <Dan(dot)Jacobs(at)gmal(dot)com> writes:

> I am fairly new to PHP and have an interesting question concerning the
> proper way to pass an array value from one division to another.
> I have an array I am building "on the fly" so to say. Let's say it has
> 100 items in it. Inititally, there is only one dimension to the
> array. Then later, I add a second dimension to that mainly to save
> time from having to create a second array.

That sounds like an odd thing to do, and not a very good reason to do
it! How much time does it save?

> As an example, I have created $myarray[0]. On the second dimension I
> add $myarray[0]['name'].
> Here comes the problem. $myarray[0] prints and displays just fine in
> column 1 and column 2. $myarray[0]['name'] prints fine in column 1,
> but when printed in column 2, I get an illegal offset error
> message. Is there something I am missing to get $myarray[0]['name'] to
> print in column 2?

You'll have to post the code, or code that exhibits the same problem.
I, for one, can't work out what you are doing (let alone what you are
doing wrong) from this description.

--
Ben.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: richard
Next Topic: Playlist different from displayed list in source html code
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 23:45:58 GMT 2024

Total time taken to generate the page: 0.03967 seconds