Tárraga Tárraga - 8 months ago 59
PHP Question

PHP array_diff output

I am using array_diff correctly to compare 2 arrays.

In documentation, it says the output is like this:

[1] => blue

As you can see, each output will come in a single line.

But when I try it, it only shows me output in 1 line.

enter image description here

Maybe now can be a little friendly, because I only have 4 rows to compare, but I'm supposed to have, in the future, hundreds of them.

How could I solve this?


You can "pretty print" your array:

echo "<pre>";
echo "</pre>";