I was reading through a php to python article which was talking about pythons equivalent of foreach()
they gave the php code example as
foreach ( $items as $item )
echo $item;
Is this a valid syntax without the {}
ive always seen it written as
foreach ( $items as $item ){
echo $item;
}
I ran the first example through coderunner locally to see if it would through an error and it didnt, is this a valid syntax to use or will i run into problems using it ?