Jump to content

Need some help with countResponse


spymaster

Recommended Posts

hi guys, need help with this question...

 

A PHP function countResponses is to be defined that will take an array of feedback statements

and return the number of times that a particular statement has occurred.

 

$responses=array('Outstanding','Outstanding','MostlyOK','Dull','Outstanding');

print "No is ".countResponse('Outstanding',$responses);

 

Complete the definition of countResponse below.

 

function countResponse( ) {

$countNumber=0;

foreach( ) {

if( ) { };

};

return ;

}

 

 

thanks in advance!

Link to comment
https://forums.phpfreaks.com/topic/272690-need-some-help-with-countresponse/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

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.