Jump to content

Adding Array Values


CosmosRP

Recommended Posts

Hey guys:

 

If I some multi-dimensional arrays, like so:

 



array {

array {
  [0]=>
     "Path1"
  [1]=>
   "10"
}

}

array {

array {
  [0]=>
     "Path2"
  [1]=>
   "16"
}

array {
  [0]=>
     "Path3"
  [1]=>
   "110"
}

}

 

How can I add all of the values of key 1? I know its a foreach loop,  but I can't figure it out... would it be this?

 

Link to comment
https://forums.phpfreaks.com/topic/256753-adding-array-values/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.