doubledee Posted April 28, 2012 Share Posted April 28, 2012 What is the name for this Array Format... $resultsArray[] = array('questionID' => $questionID, 'question' => $question, 'answer' => $new_answer, 'DB_answer' => $old_answer, 'message' => $message[$q]); And does this have anything to do with Object-Oriented Programming?! Thanks, Debbie Quote Link to comment https://forums.phpfreaks.com/topic/261748-name-of-array-format/ Share on other sites More sharing options...
creata.physics Posted April 28, 2012 Share Posted April 28, 2012 It is a multidimensional array if that is what you are asking. That means that the array has more than one dimension. Here's a one dimensional array: $array = array( 'key' => 'value' ); Here's a multidimensional array: $array = array( array( 'key' => 'value' ) ); Your array has more than one dimension because: $resultsArray[] Is an array due to the [] at the end of the string. All types of arrays can be used with procedural or object oriented coding. So in a sense it has something to do with oop, but the array itself isn't object oriented. If you google search "php array formats" you won't find anything relevant to what you're asking about. If you google search "php object oriented arrays" you'll just find arrays used in object oriented code. Hope I helped. Edit: It turns out I know nothing and need to go back to school, I'm very close-minded and need to open up to new ideas and methods. This guy has a class ( object ) which behaves like an array, so in a sense it's an object oriented array: http://phpadvent.org/2011/better-object-oriented-arrays-by-ryan-parman Quote Link to comment https://forums.phpfreaks.com/topic/261748-name-of-array-format/#findComment-1341312 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.