Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6070263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:54:48+00:00 2026-05-23T09:54:48+00:00

Hi everyone i am looking to get a sum out off array elements. out

  • 0

Hi everyone i am looking to get a sum out off array elements. out of the following array.
I want the final sum off size key added up.

    Array
(
    [105 - Screama & Merkury - Kiss Me (Ft. Farah).mp3] => Array
        (
            [name] => 105 - Screama & Merkury - Kiss Me (Ft. Farah).mp3
            [time] => 1309246242
            [size] => 5912295
            [hash] => ae6c5dda2b75a4fcbd9f36394f744717
        )

    [106 - The Fives - It's What You Do (Ft. Vanya Taylor).mp3] => Array
        (
            [name] => 106 - The Fives - It's What You Do (Ft. Vanya Taylor).mp3
            [time] => 1309246243
            [size] => 6361223
            [hash] => 8898827f715e88c7c667bcbc716086f6
        )

    [107 - Crazy Cousinz - Funky Anthem (Ft. MC Versatile).mp3] => Array
        (
            [name] => 107 - Crazy Cousinz - Funky Anthem (Ft. MC Versatile).mp3
            [time] => 1309246243
            [size] => 4841021
            [hash] => dce7d5d3b781625f3e74eab58efc3779
        )

    [108 - Funky Dee - Are You Gonna Bang.mp3] => Array
        (
            [name] => 108 - Funky Dee - Are You Gonna Bang.mp3
            [time] => 1309246243
            [size] => 3766429
            [hash] => 6605b648ead22ace8e5ce77e3c53801f
        )

    [109 - Mr M - Dash Down.mp3] => Array
        (
            [name] => 109 - Mr M - Dash Down.mp3
            [time] => 1309246243
            [size] => 4099700
            [hash] => 1dcb8a77de83ec0315fc4431ff31f311
        )

    [110 - S-X - Woooo.mp3] => Array
        (
            [name] => 110 - S-X - Woooo.mp3
            [time] => 1309246243
            [size] => 3364615
            [hash] => 5069b5956c99bcf468bc3fd00178cc22
        )

    [111 - Lil Silva - Different VIP.mp3] => Array
        (
            [name] => 111 - Lil Silva - Different VIP.mp3
            [time] => 1309246244
            [size] => 4019543
            [hash] => 8b73799089a8a8e64cdff8436fa8c446
        )

    [crossdomain.xml] => Array
        (
            [name] => crossdomain.xml
            [time] => 1309245738
            [size] => 216
            [hash] => 3cb3c78f77460e93c87faec3b50a8434
        )

)

I want to add up all the size keys. how can i do this i am looking a using array_sum but dont now how to change the array to just show the size key any help please.

😉

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:54:48+00:00Added an answer on May 23, 2026 at 9:54 am
    $totalSize = 0;
    foreach($yourarray as $file => $attr) {
        $totalSize += (int) $attr['size'];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey there, everyone. A really random question, but I'm looking to get into some
Hi everyone i am looking for a way to get code that i have
I am looking for everyone's opinion on what is the best way to stream
Hey everyone. I'm fairly new to VB.NET and I'm looking to create a module
I'm a C# developer looking to get into home automation as a hobby. I
Hey everyone. So what i am looking to do is achieve a cleaner url
Hey everyone. I'm really struggling to figure out the logic with this one and
I have been looking around and would like to know what everyone uses to
I'm looking to simply pull some quoted text out of a function call and
First off, greetings everyone and thank you for your interest in my question. I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.