Hackerss.com

Hackerss.com is a community of amazing hackers

Hackerss is a community for developers, data scientitst, ethical hackers, hardware enthusiasts or any person that want to learn / share their knowledge of any aspect of digital technology.

Create account Log in
hackerss
hackerss

Posted on

Remove null elements in Php

Remove null elements - Php:


<?php

$array = [1, 2, 3, null, 4, 5, null, 6];

$array = array_filter($array);

print_r($array);


Enter fullscreen mode Exit fullscreen mode

Top comments (0)