Skip to:
Content
Pages
Categories
Search
Top
Bottom

how should i add an array to a multi-dimensional array?

  • @firetag

    Participant

    I am building a highscores for a plugin I am developing. Right now I am using the get_col() wordpress function to get the data, but I also need to get other columns at the same time. I am not sure how to do this. I was thinking I could create a multi-dimensional array and use multiple get_col() function calls and just combine the data and stick it into the multi-dimensional array…I honestly have no idea on the syntax for this… can I use the built in php function push? If so how do I only add onto one portion of the array… is it like $array[ ] [ ] [ ] [ ] how do i only add onto only one bracket thing(sorry don’t know the word lol)

Viewing 1 replies (of 1 total)
  • @jeffsayre

    Participant

    The PHP website is a great resource: http://php.net/manual/en/language.types.array.php

    Also, I’d suggest purchasing a book on PHP and reading it from start to finish. Make sure you do all the practice lessons in the book. When you’ve got the basics down, the book will serve as a great resource to have around when you need it.

Viewing 1 replies (of 1 total)
  • The topic ‘how should i add an array to a multi-dimensional array?’ is closed to new replies.
Skip to toolbar