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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:09:08+00:00 2026-05-23T03:09:08+00:00

Here is my actual requirement (edited) array(‘1-One’,’2-second’,’10-ten’,’3-third’,’11-elevan’,’4-four’) How can I print the above array

  • 0

Here is my actual requirement (edited)

array('1-One','2-second','10-ten','3-third','11-elevan','4-four')

How can I print the above array as

1-One
2-second
3-third
4-four
10-ten
11-elevan

ie by the sort order of prefix number

  • 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-23T03:09:09+00:00Added an answer on May 23, 2026 at 3:09 am
    sort($array,SORT_NUMERIC);//add extra parameter to change default sorting behave
    print_r($array);
    

    DEMO

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

Sidebar

Related Questions

Im making an asynchronous call from a class to another. Here is my actual
I know I'm missing something here. In the XSLT transformation below, the actual result
Here is my actual table schema (I'm using Mysql) : Table experiment : code(int)
Granted he didn't show us actual code here, just mentioned it, I found it
Here at work we have developed a SOAP WCF API that can be reached
My requirement here is to retrieve the node that matches the hostname (for eg.
I am looking for design guidance here more than actual solutions, but welcome both.
So, here is the actual question (it's for a homework): A hashtable is data
The requirement is that the user can write an article, therefore I choose type
Here's a basic regex technique that I've never managed to remember. Let's say I'm

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.