Jump to content

[SOLVED] Explode(), simple question


chmpdog

Recommended Posts

you could use a foreach to loop over the elements, but i decided to use array_walk:

<?php
$str = 'thing,thing2,thing3,thing4';
$list = explode(",",$str);
array_walk($list,create_function('&$v','$v = md5($v);'));
$str = implode(",",$list);
print $str;
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.