I have an array:
$array = array("1" => "", "2" => "" , "3" => "data1", "4" => "" , "5" => "data2", "6" => "" );
It’s declared with for leaving some empty values.Array can be too long. I want a method to find filled array numbers in PHP.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Check this, will give you all empty array keys
If you want to remove the empty value keys
use array_filter