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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:46:40+00:00 2026-06-13T05:46:40+00:00

i was working on array using PHP lang. I got following output by rotating

  • 0

i was working on array using PHP lang. I got following output by rotating for loop.
Now want to split this into two different array. Any one please guide me to split into two different array… Like into a[0] = 810 and b[0] = 44

as well as , i am trying to sort it without changing the values for example sorting max value a[0] = 840 & b[0] = 87

Array
(
    [0] => 810/44
    [1] => 0/280
    [2] => 73/279
    [3] => 0/278
    [4] => 0/277
    [5] => 0/276
    [6] => 840/87
    [7] => 0/275
    [8] => 0/274
    [9] => 0/273
    [10] => 6/271
    [11] => 0/272
    [12] => 0/269
    [13] => 3/267
    [14] => 0/268
    [15] => 3/259
    [16] => 124/108
    [17] => 82/239
    [18] => 221/238
    [19] => 30/160
    [20] => 3/161
    [21] => 65/168
    [22] => 73/169
    [23] => 0/170
    [24] => 0/248
    [25] => 192/226
    [26] => 209/222
    [27] => 80/223
    [28] => 273/182
    [29] => 79/183
    [30] => 73/184
    [31] => 73/185
    [32] => 6/186
    [33] => 73/187
    [34] => 0/188
    [35] => 48/270
    [36] => 138/190
    [37] => 370/191
    [38] => 152/192
    [39] => 12/200
    [40] => 200/210
    [41] => 0/213
    [42] => 21/212
    [43] => 124/214
    [44] => 0/215
    [45] => 0/216
    [46] => 133/217
    [47] => 6/260
    [48] => 73/285
    [49] => 73/284
    [50] => 0/283
    [51] => 73/286
    [52] => 73/287
    [53] => 0/288
    [54] => 73/289
    [55] => 0/290
    [56] => 76/291
    [57] => 76/292
    [58] => 0/293
    [59] => 0/294
    [60] => 0/295
    [61] => 0/296
    [62] => 0/297
    [63] => 3/298
    [64] => 0/299
    [65] => 0/300
    [66] => 3/301
)
  • 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-13T05:46:41+00:00Added an answer on June 13, 2026 at 5:46 am

    How about:

    $a = $b = array();
    
    foreach ($array as $key => $value) {
        list($a[$key], $b[$key]) = explode('/', $value, 2);
    }
    

    EDIT: To handle the sorting afterwards, you can use this:

    array_multisort($a, SORT_DESC, SORT_NUMERIC, $b);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working with two-dimensional array-values that should be inserted into a ArrayList. But this
So I'm working on a form, and I'm using PHP to pull an array
I want to make a simple news system using PHP and MySQL, right now
I am developing my first simple website using PHP. Now, I am working in
I am working on insert array value in database in php using oops.I call
Recently I'm working with Facebook batch requests using PHP. Now, I'm trying to get
I am working on XML data extraction using php and came across two challenging
I am working on a project that pulls data from JMS queue using PHP
I'm using php with smarty. In php I have two arrays: $code = Array
PHP developer here working with c#. I'm using a technique to remove a block

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.