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 8885859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:24:53+00:00 2026-06-14T21:24:53+00:00

Possible Duplicate: Remove empty array elements I have an array like this Array (

  • 0

Possible Duplicate:
Remove empty array elements

I have an array like this

Array ( [81] => 5.00 [78] => 4.67 [13] => 4.67 [65] => 4.60 [91] => 4.50 [4] => 4.40 [7] => 4.25 [11] => 4.20 [47] => 4.20 [21] => 4.20 [66] => 4.17 [48] => 4.00 [37] => 4.00 [69] => 4.00 [49] => 4.00 [38] => 4.00 [54] => 4.00 [62] => 4.00 [63] => 4.00 [64] => 4.00 [61] => 4.00 [60] => 4.00 [52] => 4.00 [59] => 4.00 [80] => 4.00 [50] => 4.00 [34] => 4.00 [16] => 4.00 [18] => 4.00 [9] => 4.00 [5] => 4.00 [3] => 4.00 [19] => 4.00 [20] => 4.00 [25] => 4.00 [42] => 3.83 [73] => 3.83 [28] => 3.83 [58] => 3.83 [15] => 3.83 [45] => 3.80 [10] => 3.80 [67] => 3.75 [17] => 3.75 [2] => 3.75 [27] => 3.75 [32] => 3.75 [51] => 3.75 [1] => 3.75 [31] => 3.71 [53] => 3.70 [72] => 3.70 [26] => 3.67 [82] => 3.67 [12] => 3.67 [71] => 3.67 [77] =>  [70] =>  [41] => 3.67 [8] => 3.60 [22] => 3.60 [57] => 3.60 [39] => 3.60 [83] => 3.60 [76] => 3.50 [74] => 3.50 [79] => 3.50 [43] => 3.50 [35] => 3.50 [14] => 3.50 [6] => 3.50 [44] => 3.50 [33] => 3.50 [89] => 3.33 [68] => 3.30 [29] => 3.25 [40] => 3.20 [24] => 3.17 [30] => 3.13 [56] => 3.00 [36] => 3.00 [23] => 3.00 [55] => 3.00 [46] => 2.67 [90] =>  ) 

Now what i want is to remove blank value indexes from this array. Thanks in advance.

  • 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-06-14T21:24:54+00:00Added an answer on June 14, 2026 at 9:24 pm

    You can use array_filter

    function not_empty($a)
    {
        return !empty($a) && !is_null($a);
    }
    
    $array = array_filter($array, 'not_empty');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: php multi-dimensional array remove duplicate I have an array like this: $a
Possible Duplicate: Remove duplicates from array I have a list of items. I want
Possible Duplicate: Remove item from array by value I am maintaining string lists like
Possible Duplicate: remove duplicate from string in PHP Have a string like: $str =
Possible Duplicate: Remove duplicates from array Could you please help me out. I have
Possible Duplicate: Remove from the array elements that are repeated. in Ruby I would
Possible Duplicate: Remove duplicates from a List<T> in C# i have a List like
Possible Duplicate: Remove elements from array? how would I remove all array elements but
Possible Duplicate: PHP - remove <img> tag from string I have my content like
Possible Duplicate: Remove duplicates from array I have an int array which contains a

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.