PHP 8.5.0 Alpha 4 available for testing

Voting

: five plus zero?
(Example: nine)

The Note You're Voting On

Anonymous
10 years ago
null values are imploded too. You can use array_filter() to sort out null values.

<?php
$ar
= array("hello", null, "world");
print(
implode(',', $ar)); // hello,,world
print(implode(',', array_filter($ar, function($v){ return $v !== null; }))); // hello,world
?>

<< Back to user notes page

To Top