Open Source Tutorials - Open Source Training
Open source training & tutorials from experienced, passionate people
chrome icon firefox icon ie icon opera icon safari icon Sings in these Browsers
A- A A+

By A Web Design

Welcome, Guest
Username Password: Remember me

Two-dimensional array
(1 viewing) (1) Guest
All your queries regarding
PHP Installation,
Binding Apache-PHP-MySQL,
and tonnes more... will be solved in this forum
  • Page:
  • 1
TOPIC:

Two-dimensional array

Two-dimensional array 11 months, 1 week ago #643

  • kate
  • OFFLINE
  • Senior Boarder
  • Posts: 47
  • Karma: 0
How come the code <?php print "Contents: $arr[1]"; ?> works, but <?php print "Contents: $arr[1][2]"; ?> doesn’t for two-dimensional array of mine?

Re: Two-dimensional array 11 months ago #646

  • manav
  • OFFLINE
  • Senior Boarder
  • Posts: 51
  • Karma: 0
Any time you have an array with more than one dimension, complex parsing syntax is required. print "Contents: {$arr[1][2]}" would have worked.
  • Page:
  • 1
Time to create page: 2.05 seconds
OSV Newsletter


Receive HTML?

NOTE: To prevent subscription to the OSV newsletter, uncheck the checkbox above.
Guest Blog for OSV
Free Ebook Download