Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8271357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:49:09+00:00 2026-06-08T06:49:09+00:00

I have a typical question, I’m not sure whether it is possible or not.

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T06:49:10+00:00Added an answer on June 8, 2026 at 6:49 am
    if(!empty($_POST['Producer']))
    {
        if(stripos($_POST['Producer'], ' and ') != false) // ' and ' is found
            $producers = $_POST['Producer'] .' are the producers ';
        else
            $producers = $_POST['Producer'] .' is the producer ';
    
        $description = $producers .'of the movie';
    }
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question not probably not typical stackoverflow but am not sure where to ask
Weird question, but I'm not sure if it's anti-pattern or not. Say I have
New to DDD here and have a architecture question which should be a typical
I have a typical mail.php script, which uses the mail() function. After the user
For my first question, I have your typical web e-com scenario where the user
Simple question, but is the solution? I have a typical C# Application that runs
So i have a question. Say you have a table requests, which represent a
I have a question regarding Caching. I have a typical n-tier ASP.NET web app.
I have a REST API which is fairly typical, except that the id's of
Hey there programming peps! I have a question re: jQuery. We have a software

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.