PHP Display array data

This topic contains 3 replies, has 1 voice, and was last updated by  Abhey 2 years, 4 months ago.

  • Author
    Posts
  • #11018

    MarkGrillo
    Member

    I have been trying to figure this out and had no success. Had a look online and found nothing.

    I have an array:

    Could anyone tell me what function i have to use so they just display like this:

  • #11019

    SapnaVishwas
    Member

    You need the implode function. More info here:

    http://php.net/manual/en/function.implode.php

    Use it like this:

    echo implode(",", $names);

  • #11020

    Adan
    Member

    Here’s a solution…

  • #11021

    Abhey
    Member

    This will do exactly what you want

You must be logged in to reply to this topic.