The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
hot to get user ids from database to array
#1
Big Grin 
Hi,
i have a problem with my array_filter
Example i need all usernames or ids for the array_filter like the $filter examples

How can i get all ids into this format

thanks a lot for checking my thread

PHP Code:
$filter = array("1","2","3"); 
or

PHP Code:
$filter = [1,2,3]; 

array_filter example
PHP Code:
$filter = array("1","2","3");
$filter = [1,2,3];
                
$filtered 
array_filter($responseData['json'], function ($item) use ($filter) {
return 
in_array($item['id'], $filter);
}); 
admins please move my thread At
  Reply


Messages In This Thread
hot to get user ids from database to array - by Vtins - 03-21-2019, 07:00 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)