mjedman1 Posted July 8, 2008 Share Posted July 8, 2008 Anyone have a clever way of adding character to beginning and end of all values of an array? Link to comment https://forums.phpfreaks.com/topic/113826-solved-add-character-to-beginning-and-end-of-an-array/ Share on other sites More sharing options...
lemmin Posted July 8, 2008 Share Posted July 8, 2008 Try this: foreach ($array as $i => $element) $array[$i] = $char . $element . $char; Link to comment https://forums.phpfreaks.com/topic/113826-solved-add-character-to-beginning-and-end-of-an-array/#findComment-584920 Share on other sites More sharing options...
mjedman1 Posted July 8, 2008 Author Share Posted July 8, 2008 <3 Link to comment https://forums.phpfreaks.com/topic/113826-solved-add-character-to-beginning-and-end-of-an-array/#findComment-584923 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.