Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- remove last seperator from array while loop
rocknbil - 4:34 pm on Apr 6, 2012 (gmt 0)Thread source:: http://www.webmasterworld.com/php/4437919.htm
I like to use option b with preg_replace. :-) It's less lines of code (no counter and if's) and executes a mod on the output once.
$data = preg_replace('/,\s+$/','',$data);
Brought to you by WebmasterWorld: http://www.webmasterworld.com