Scott Yu - builds stuff
Scott Yu - builds stuff

Reputation: 11763

PHP: Return one of several arrays

I have a result that looks like this when I do a print_r($array);

(
    [0] => 96
    [1] => 95
    [2] => 94
)
Array
(
    [0] => 96
    [1] => 95
    [2] => 94
)
Array
(
    [0] => 96
    [1] => 95
    [2] => 94
)

How can I simply return something like "96,95,94"? And not return all 3 duplicate instances?

Thanks

Upvotes: 0

Views: 51

Answers (1)

Frankie
Frankie

Reputation: 25165

print_r($array[0])

If you have 3 repeated Arrays just use the first one.

Upvotes: 1

Related Questions