PHP Conference Kansai 2025

Voting

: eight plus one?
(Example: nine)

The Note You're Voting On

Anonymous
9 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