I have a array which i have extracted from html using DOM. Now as the below array shows there are many empty data which i dont want. So wenever i try to remove the empty values from the array its not removed.
Array ( [0] => [1] => Outpost Congratulations13 [2] => [3] => [4] => [5] => [6] =>
[7] => Yard will reflect the type of work that they do and the strength and variety of their membership, from recent graduates to emerging and mid-career artists.
[8] => [9] => [10] => [11] => Gallery Closed Good Friday, open Bank Holiday Monday. Admission Free
[12] => [13] => K Yard, Castle Street
[14] => [15] => Friday 1 Mar 3 [16] => [17] => [18] => [19] => www.somesite.co.uk
[20] => [21] => [22] => [23] => Map [24] => [25] => Contact the Organiser Tell a Friend about this Event [26] => [27] => Plan Your Journey [28] => [29] => [30] => )
What all i have tried:-
- array_filter : It did nt work.
- Many functions to check whether the value is empty or not still did not work.
- I tried to use strlen to find the length of empty strings , But it shows 22, 2 30 as the lenght.
- I use str_replace to replace spaces with ntg still nt working and stlen is showing 22, 28,etc for empty values.
- I have used trim bt no use...
Can anyone help me out as to why the strlen of a data is 22 or more. And how to remove these type of elements from array???
echo bin2hex($arr[0])?