in PHP by (13.6k points)
0 like 0 dislike

How I can to print array like string in PHP? Me need analogue echo for array in PHP.

php echo array as string
php echo array values

1 Answer

0 like 0 dislike
by (13.6k points)

For this use standard function implode:

echo implode(NULL, $arr);

Implode function join array elements with help specified string, and return all items as string.

Your answer

Try to answer the question as detailed as possible.
Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.