- array_map: documentation ( source)
- var_dump: documentation ( source)
- implode: documentation ( source)
- str_split: documentation ( source)
<?php
$string = 'This is a string!';
$i = 0;
var_dump(implode('', array_map(str_split($string), function($val, $key) {
return ($key % 2 ? $val : null);
})));