3raser Posted June 22, 2010 Share Posted June 22, 2010 What does the PHP implode really do, and how do you use it? I looked up a tutorial on the PHP manual, but the tutorials their are to complicated and are for more experienced users. Any tutorials or examples for walk throughs? Link to comment https://forums.phpfreaks.com/topic/205494-implode/ Share on other sites More sharing options...
Alex Posted June 22, 2010 Share Posted June 22, 2010 The manual is pretty self explanatory. It takes an array and combines all the elements into a string separated by whatever delimiter you supply. $arr = array('one', 'two', 'three'); echo implode('-', $arr); // one-two-three echo implode('|', $arr); // one|two|three implode. edit: Oh, and if you supply no delimiter it just puts them together like this: $arr = array('one', 'two', 'three'); echo implode($arr); // onetwothree Link to comment https://forums.phpfreaks.com/topic/205494-implode/#findComment-1075321 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.