Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to create coma separated string from an array

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 103
    Comment on it

    Hello Reader's if you have an array and you want it to converted into string with separated by coma then by using PHP you can do this as follow:-

    You have to use Implode function

    $arr = array(1,2,3,4,5,6,7,8,9);
    
    $string = rtrim(implode(',', $arr), ',');
    
    echo $string;
    

    Output:

    1,2,3,4,5,6,7,8,9
    

    This is in string format

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: