1. If a word starts with a consonant, put the first letter of the word at the end of the word and add "ay."
ex: happy = appyh + ay = appyhay
Here's a PHP script that translates input text into Pig Latin:
<?php
function toPigLatin($input) {
// Split the input into words
$words = explode(' ', $input);