I have a typical question, I’m not sure whether it is possible or not. I have a form in which there is a field namely Producer. How do I make it possible, if user use the word and in the field then insert the word are in the result, and if user don’t use the word and in the field then insert the word is in the result. Let me explain you with an example.
Example (the word and is in the field) then generate the following result:
ABC and DEF are the producers of the movie.
Example (the word and is NOT in the field) then generate the following result:
XYZ is the producer of the movie.
I have the following code:
if(!empty($_POST['Producer'])) {
$description .= ' ' . $_POST["Producer"] . ' is/are the producer(s) of the movie';
}
Kindly tell me if anyone have the idea.
I put
' and 'instead of'and'(with whitespaces) because some names contains the word ‘are’, so it would return true even if there’s only one name.