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 )

  • Moderators
  • 16,943 posts
  • LocationCheshire, UK

Posted 13 February 2013 - 11: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] );
     }
  }

If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.







moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users