You can use array_keys()
to get the names and then use array_filter()
to remove the 0
values:
$names = array_filter(array_keys($data));
print_r($names);
Output:
Array
(
[0] => HTML
[1] => Javascript
[3] => Scripts
[4] => Style
[5] => images
)