User Profile

Collapse

Profile Sidebar

Collapse
mcafeedan
mcafeedan
Last Activity: Jul 31 '09, 03:05 PM
Joined: Jun 11 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • mcafeedan
    replied to PHP Single Array to Multi Array Problem
    in PHP
    Solution figured out...

    Well, I was able to figure out the solution by playing around with the indexes and coming to the conclusion that the second index was not necessary. As soon as I dropped that index PHP moved everything as desired. Solution looked like this:

    arr1[0] = arr2[j];

    Suggesting that PHP add additional items to a multi-dimensioned array the same way it does in single dimensioned arrays...
    See more | Go to post

    Leave a comment:


  • mcafeedan
    replied to PHP Single Array to Multi Array Problem
    in PHP
    Not what I need...

    I need to extract the field to the second part of the multi-field array (arr1[0][$j]).

    Further info:

    I tried putting the information into a variable and then loading the array from the variable and the destination array (arr1) still is truncating all but the first character.

    $holdingCell = $arr2[$j];
    $arr1[0][$j] = $holdingCell;

    echo $holdingCell;...
    See more | Go to post

    Leave a comment:


  • mcafeedan
    started a topic PHP Single Array to Multi Array Problem
    in PHP

    PHP Single Array to Multi Array Problem

    I have exploded a file line into a single dimensioned array. I want to take the contents of the single deminsioned array and separate it out into a multi-dimensioned array.

    In the for loop I have code like this:

    $arr1[0][$j] = $arr2[$j];

    where the j index is changing. The result is only the first character of the arr2 is being deposited into arr1 for each element of the array. arr2 is still intact...
    See more | Go to post
No activity results to display
Show More
Working...