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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:47:59+00:00 2026-06-06T12:47:59+00:00

I have a problem like,array with 0 10 indexes and i removed 0th index

  • 0

I have a problem like,array with 0 10 indexes and i removed 0th index now it’s like 1 to 10
when i display this array there is an empty column in 0th position.I want to rearrange this array to 0 to 9.
The purpose is the array construct my grid and 0th position is for edit ,if a user doesn’t have the permission then i unset the 0th element.
How do i rearrange my array to 0 to 9

Sample array structure is like

[fields] => Array
    (
        [1] => Array
            (
                [header] => Array
                    (
                        [fieldName] => OFFERID
                        [displayName] => History
                        [width] => 70
                    )

                [visibility] => Array
                    (
                        [showOnStart] => 1
                        [editable] => 
                    )

                [cell] => Array
                    (
                        [type] => raw
                        [params] => Array
                            (
                                [text] => <a href="javascript:void(0);" id="{{OFFERID}}" class="btnHistory">History</a>
                            )

                    )

                [sort] => Array
                    (
                        [sortable] => 1
                    )

                [validator] => Array
                    (
                        [name] => 
                        [params] => 
                    )

            )

        [2] => Array
            (
                [header] => Array
                    (
                        [fieldName] => OFFERID
                        [displayName] => Offer Id
                        [group] => 0
                    )

thanks
Alex

  • 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-06T12:48:00+00:00Added an answer on June 6, 2026 at 12:48 pm

    You could use array_splice to remove a portion of the array.

    array array_splice ( array &$input , int $offset [, int $length = 0 [, mixed $replacement ]] )

    For example:

    $array = array(0 => "a", 1 => "b", 2 => "c");
    array_splice($array, 0, 1);
    var_dump($array);
    

    Will output:

    array(2) {
      [0]=> string(1) "b"
      [1]=> string(1) "c"
    }
    

    Notice it will re-index your array, as you requested.

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

Sidebar

Related Questions

I have a problem where I have some html like this <p>There is the
I have a character array like this : +---+---+---+ |53.|.7.|...| |6..|195|...| |.98|...|.6.| +---+---+---+ I
I have a model pretty much like this: Document Release has an embedded array
Hi I have a problem to manipulate an array with another array like the
I need help to solve this problem: I have a csv file like this
I have a problem assigning an array like: int a[]; int b[] = {1,2,3};
I have the same problem like this question: Custom title bar in PreferenceActivity? After
I have a common problem in PHP : My $_FILES array is empty when
I have PHP script works without problems, like this : while($row4 = mysql_fetch_array($result4)) {
i have problem using LIKE structure in DB2 : for example: select * from

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.