Jump to content

alpine

Members
  • Content count

    759
  • Joined

  • Last visited

Community Reputation

3 Neutral

About alpine

  • Rank
    Prolific Member
  • Birthday 03/26/1973

Profile Information

  • Gender
    Male
  • Location
    Norway

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. alpine

    Array help

    Assuming the common identifier in the first array always has the first position: <?php foreach( $arr_1 as $k => $data ) { if ( isset( $arr_2[$data[0]] ) ) { $arr_1[$k][] = $arr_2[$data[0]]; } } ?> This will add data from the second array to the first array
  2. alpine

    Manipulate a single value in an array

    Sorry, im on two computers and tested it from one and then just typed it in the forumpost from another, so it glitched naturally. No big fuzz, but brilliant that the post cannot be edited.
  3. alpine

    Manipulate a single value in an array

    Also, there are often multiple solutions to any problem, here is another <?php function revname( $str ) { return implode( ' ', array_reverse( explode( ',', $str ) ) ); } echo implode( '<br>', array_map( revname, array( 'Burgess, Kevin', 'Smith, John' ) ) ); // Kevin Burges<br>John Smith ?>
  4. alpine

    Matching events in an array

    $thematches->linkset->link is obviously not an array (anymore), thats why its flagged as invalid Simple test: if(is_array($thematches->linkset->link)){ echo '<p>is array:</p>'; print_r($thematches->linkset->link); } else{ echo '<p>is not an array:</p>'; echo $thematches->linkset->link; }
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.