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
Displaying an array value in two columns [message #185849] Mon, 12 May 2014 19:15 Go to previous message
Dan Jacobs is currently offline  Dan Jacobs
Messages: 1
Registered: May 2014
Karma:
Junior Member
Hello all.

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.
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?

Thanks for any kind help.

Dan.
[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 21:04:49 GMT 2024

Total time taken to generate the page: 0.03442 seconds