I have this for loop:
for($i=0; $i < $N; $i++)
$require_1 .= $require[$i] . " ";
I would like it to place a comma on the end of the first word, if there's 2 words in the string. However if there's only 1 word in the string I want it left alone.
I understand I need to use an if statement, based on $i. However I'm not sure how I do this.
$requirecontain? Where are the words?