【发布时间】:2015-08-06 15:08:49
【问题描述】:
我有两个数组:$story 和 $languages
现在我想知道$languages 中的元素或值出现在$story 数组中的次数。这意味着$languages数组的“php”、“javascript”、“mysql”在$story中出现了多少次?
如何在 php 中做到这一点?任何人都可以帮忙吗?这是我的数组...
$story = array();
$story[] = 'As a developer, I want to refactor the PHP & javascript so that it has less duplication';
$story[] = ' As a developer, I want to configure Jenkins so that we have continuous integration and I love mysql';
$story[] = ' As a tester, I want the test cases defined so I can test the system using php language and phpunit framework';
$languages = array(
'php', 'javascript', 'mysql'
);
【问题讨论】:
标签: php