简体   繁体   中英

Print Array Elements on one line

I'm populating an array variable $array at some point in my code, for example like below

this

is

an

array

varaible

What if, I wanted to print out the array variable like thisisanarrayvariable as one liner

i took the below approach, but i'am not getting any out while the program is hanging

for ($i=0;$i -le $array.length; $i++) { $array[$i] }

obviuosly, i dont want to glue them together like $array[0]+$array[1]+$array[2]..

Hope i can get a better answer.

I'm populating an array variable $array at some point in my code, for example like below

this

is

an

array

varaible

What if, I wanted to print out the array variable like thisisanarrayvariable as one liner

i took the below approach, but i'am not getting any out while the program is hanging

for ($i=0;$i -le $array.length; $i++) { $array[$i] }

obviuosly, i dont want to glue them together like $array[0]+$array[1]+$array[2]..

Hope i can get a better answer.

I'm populating an array variable $array at some point in my code, for example like below

this

is

an

array

varaible

What if, I wanted to print out the array variable like thisisanarrayvariable as one liner

i took the below approach, but i'am not getting any out while the program is hanging

for ($i=0;$i -le $array.length; $i++) { $array[$i] }

obviuosly, i dont want to glue them together like $array[0]+$array[1]+$array[2]..

Hope i can get a better answer.

I'm populating an array variable $array at some point in my code, for example like below

this

is

an

array

varaible

What if, I wanted to print out the array variable like thisisanarrayvariable as one liner

i took the below approach, but i'am not getting any out while the program is hanging

for ($i=0;$i -le $array.length; $i++) { $array[$i] }

obviuosly, i dont want to glue them together like $array[0]+$array[1]+$array[2]..

Hope i can get a better answer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM