Anonymous user
Tokenize a string: Difference between revisions
no edit summary
No edit summary |
|||
Line 138:
my @words = split(/,/, "Hello,How,Are,You,Today");
print $_.'.' for (@words);
==[[PHP]]==
[[Category:PHP]]
'''Interpreter:''' [[PHP]] any 5.x
<?php
$str = 'Hello,How,Are,You,Today';
$arr = array_fill_keys(explode(',', $str), 0);
echo implode('.', array_keys($arr));
?>
==[[Python]]==
|