www.webdeveloper.com
Results 1 to 2 of 2

Thread: unable to renumber the array keys

  1. #1
    Join Date
    Sep 2013
    Posts
    2

    unable to renumber the array keys

    i am getting array output as:

    Code:
    Array ( [0] => Array ( [0] => 000000 [1] => 000400 [2] => 000450 ) ) Array ( [0] => Array ( [0] => 000350 [1] => 000400 ) )
    i want output like this:

    Code:
    Array ( [0] => Array ( [0] => 000000 [1] => 000400 [2] => 000450 ) ) Array ( [1] => Array ( [0] => 000350 [1] => 000400 ) )
    my php code is:

    Code:
    $select = mysql_query("SELECT ac_no, cust_name, GROUP_CONCAT(install_amt SEPARATOR ',') as installamt FROM ankali_slabpay  WHERE agent_id=$agent_id GROUP BY ac_no");
    while($row1 = mysql_fetch_array($select)){
    $a = $row1['installamt'];
    $outerARR = explode(" ", $a);
    $arr = array();
    foreach ($outerARR as $arrvalue){
        $innerarr = explode(",", $arrvalue);
        $arr[] = $innerarr;
    }
    print_r($arr);
    }

  2. #2
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,204
    So what is your array before your output? and not using "Dump" values helps more than the "Dump" itself.
    Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08)
    Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08)
    I want to leave this world the same way I came into it, Screaming, Incontinent & No memory!
    I laughed that hard I burst my colostomy bag... (\\.\ May03)
    Life for some is like a car accident... Mine is like a motorway pile up...

    Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles