Jump to content


Photo

Filtering an array is breaking my site

arrayunset in_array wordpress

  • Please log in to reply
20 replies to this topic

#21 Barand

Barand

    Sen . ( ile || sei )

  • Gurus
  • 14,379 posts
  • LocationCheshire, UK

Posted 13 February 2013 - 06:06 AM

For future ref, you could have accessed the worker objects' IDs

 foreach( $workers as $obj ) {
     if( !in_array($obj->ID, $k_friends, TRUE)) {
         unset( $workers[$key] );
     }
  }

moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts
|baaSelect| generate js and php code for dynamic linked dropdowns

 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com