I need to show mysql result only for current month. Following is my for each loop

foreach($projects as &$project){
    
    	$project = $module->get_project($db,$project['project_id']);
    	$project_statuses[$project['project_status']][] = $project;
  		
	}

I need add a if statement to print only result from this month. I tried using

if variable == date('m'). Did not work. Any help is appreciated.

referring to , , , there is no mention of a date field in the data,...
call it $project_date assuming its somewhere in the $projects array stored as a 4bit timestamp

if(date('m',$project_date)==date('m')) { /* bla bla bla */}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.