How to print two array separately in php?

I am beginner at php. i want to print the two array separately but failed.
Please help.
My Code : link text

Input:
1
3 3
1 2 3
4 5 6

Output:
1 2 3
4 5 6

Hope this is good enough for you mate. :slight_smile: 0YjmcF - Online PHP Interpreter & Debugging Tool - Ideone.com

2 Likes

tnq @divyansh_gaba7.

Can you please explain?

$numbers1 = explode(" ", trim(fgets(STDIN))); this line takes whole line as a string and breaks into smaller strings that are separated by space.
We then convert the each seperated string into integer value.

php - Creating an array from a string separated by spaces - Stack Overflow read this

1 Like