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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:19:48+00:00 2026-05-26T12:19:48+00:00

I am making a PHP login/register form and to confirm whether someone is actually

  • 0

I am making a PHP login/register form and to confirm whether someone is actually human and not a bot I am generating a random value that has to be written in a certain way.
For example:

Please write the following number in an increasing manner: 34745
The user should write 34457 and only then will the confirmation work.

The thing is I know how to use the rand() function, that’s how I generate the number. But the problem is I do not know how to make PHP sort the generated number’s numerical values (for ex.: 64348 -> 34468).
How do I do this? I hope there is a single function for that, as I’ve seen numerous ways to sort arrays and since they have indexes I only suppose that it should be possible to sort a number’s values.

  • 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-05-26T12:19:49+00:00Added an answer on May 26, 2026 at 12:19 pm
    <?php
    
    $number = str_split("647214");
    
    sort($number);
    $number = implode($number);
    
    echo $number;
    
    ?>
    

    Demo: http://codepad.viper-7.com/RepImd

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

Sidebar

Related Questions

I'm new to php and am making a simple login system. When someone wants
I'm making a php login, and I'm trying to decide whether to use SHA1
I'm making a php web application which stores user specific information that is not
I'm making a login page well i've actually finished the login but how would
Im making an ajax login form. When a user logs in with the wrong
I am making a registration/login system with php. I think I have all the
Ok, I'm making a login and registration panel with jquery and php. In short,
I'm making a game and I can only request pages. eg.(login.php?username=myuser&password=mypass) The game can
I am making a simple login form that saves to a database using MYSQL.
I'm making a PHP image script that will create circles at a given radius.

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.