#PHP, 92 bytes
PHP, 92 bytes
First attempt at code golf.
foreach(explode(" ",str_replace(["AND","OR","BY","OF"],"",strtoupper($s)))as$x){echo$x[0];}
The variable $s is the phrase to be converted: $s = "United States of America".
Requires PHP 5.4 or above for short array syntax to work.
#PHP, 92 bytes
First attempt at code golf.
foreach(explode(" ",str_replace(["AND","OR","BY","OF"],"",strtoupper($s)))as$x){echo$x[0];}
The variable $s is the phrase to be converted: $s = "United States of America".
Requires PHP 5.4 or above for short array syntax to work.
PHP, 92 bytes
First attempt at code golf.
foreach(explode(" ",str_replace(["AND","OR","BY","OF"],"",strtoupper($s)))as$x){echo$x[0];}
The variable $s is the phrase to be converted: $s = "United States of America".
Requires PHP 5.4 or above for short array syntax to work.
PHP, 92 characters
#PHP, 92 bytes
First attempt at code golf.
foreach(explode(" ",str_replace(["AND","OR","BY","OF"],"",strtoupper($s)))as$x){echo$x[0];}
The variable $s is the phrase to be converted: $s = "United States of America".
Requires PHP 5.4 or above for short array syntax to work.
PHP, 92 characters
First attempt at code golf.
foreach(explode(" ",str_replace(["AND","OR","BY","OF"],"",strtoupper($s)))as$x){echo$x[0];}
The variable $s is the phrase to be converted: $s = "United States of America".
Requires PHP 5.4 or above for short array syntax to work.
#PHP, 92 bytes
First attempt at code golf.
foreach(explode(" ",str_replace(["AND","OR","BY","OF"],"",strtoupper($s)))as$x){echo$x[0];}
The variable $s is the phrase to be converted: $s = "United States of America".
Requires PHP 5.4 or above for short array syntax to work.
PHP, 92 characters
First attempt at code golf.
foreach(explode(" ",str_replace(["AND","OR","BY","OF"],"",strtoupper($s)))as$x){echo$x[0];}
The variable $s is the phrase to be converted: $s = "United States of America".
Requires PHP 5.4 or above for short array syntax to work.
PHP, 92 characters
First attempt at code golf.
foreach(explode(" ",str_replace(["AND","OR","BY","OF"],"",strtoupper($s)))as$x){echo$x[0];}
PHP, 92 characters
First attempt at code golf.
foreach(explode(" ",str_replace(["AND","OR","BY","OF"],"",strtoupper($s)))as$x){echo$x[0];}
The variable $s is the phrase to be converted: $s = "United States of America".
Requires PHP 5.4 or above for short array syntax to work.