Click here to Skip to main content
15,882,055 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Quote:
How to sort an array like this ? I am getting array of strings with length but some of them are empty in markup. I need to avoid them.


[0]=> string(6) " " 
[1]=> string(5) " " 
[2]=> string(1) " " 
[3]=> string(11) "The problem"


What I have tried:

if(array_element[0] !== ''){
  //first element is not empty
}
Posted
Updated 21-May-22 8:25am

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900