PHP 8.5.0 Alpha 1 available for testing

Voting

: nine plus zero?
(Example: nine)

The Note You're Voting On

hyperzlib at outlook dot com
5 years ago
Use str_replace to remove all dashes but one from the string '-aaa----b-c-----d--e---f' (resulting is: '-aaa-b-c-d-e-f')

<?php
$challenge
= '-aaa----b-c-----d--e---f';
do
$challenge = str_replace('--', '-', $challenge, $count); while($count);
echo
$challenge;
?>

<< Back to user notes page

To Top