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: http://ideone.com/0YjmcF

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.

https://stackoverflow.com/questions/5020202/splitting-up-a-string-in-php-with-every-blank-space read this

1 Like