I would like to get a count of how many times a substring occurs in an array. This is for a Drupal site so I need to use PHP code
$ar_holding = array( usa-ny-nyc , usa-fl-ftl , usa-nj-hb ,
usa-ny-wch , usa-ny-li );
我需要能够把以下职能称为:foo($ar_holding, usa-ny- );
,并将其从$ar_holding
阵列中退回3。 我知道in_array(>
)的功能,但这种功能又回到了头一次剧的指数。 我需要寻找替代物并退还计票。