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 7736065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:39:16+00:00 2026-06-01T07:39:16+00:00

I had an interview and a question that seems really simple was not clicking

  • 0

I had an interview and a question that seems really simple was not clicking in my mind. Just want to get the answer for it because have tried a lot and unable to find solution.

I have to write a sentence in opposite like

input => My Name Is Junaid
output => Junaid Is Name My

Should not use ANY built-in function of PHP

Thanks

EDIT

I did upto this

$string = "My Name Is Junaid";
$len = strlen($string);
for($i=$len; $i > 0; $i--){
    echo $string[$i-1];
}

it results

dianuJ sI emaN yM

need some more tweaking

  • 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-01T07:39:18+00:00Added an answer on June 1, 2026 at 7:39 am
    <?php
    
    $str = "My Name is Fred";
    $i = 0;
    while( $d = $str[$i] )
    {
        if( $d == " "){
    
            $out = " ".$temp.$out;
            $temp = "";
        }else{
            $temp.=$d;
    
        }
        $i++;
    }
    echo $temp.$out;
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had an interview and I could not answer this question. You have an
I just got this question on an interview and had no idea how to
I had an interesting job interview experience a while back. The question started really
I encountered this question in an interview and had no clue how to answer:
I had an interview question that asked me for my 'feedback' on a piece
The question seems pretty simple, and so is the answer. I am a developer
I had an interview days ago and was thrown a question like this. Q:
Yesterday i had a question in an interview which i thought i could find
Had a good search here but can't see anything that gets my mind in
Had a problem with the recursive conflictCheck() method. That seems fine now. I have

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.