September 6, 200718 yr In have a database with checkboxes, but when display at the webpage it shows me as a list, so I am wonder how can I display them separated by comma. Here is what I have: <?php echo $recordData['color'][0]; ?> it does display as red blue white But I would like it to be showing as: red, blue, white Any help will be appreciated.
September 6, 200718 yr You can use the str_replace() function (http://www.php.net/manual/en/function.str-replace.php) so you could do something like: echo (str_replace($recordData['color'][0] , ", " , "r")); or $out = str_replace($recordData['color'][0] , ", " , "r"); echo ($out); The r is a return. I'm not sure what the line break character is in your case, it may be n. Regards, Don
Create an account or sign in to comment