Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function string($string) {
- $arraySize = count($string);
- for($x = 0; $x < $arraySize; $x++) {
- if ($x < $arraySize-1) {
- echo $string.",";
- } else {
- echo $string;
- }
- }
- return $string;
- }
- $string = "this,is,a,test";
- echo string($string);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement