相关疑难解决方法(0)

以编程方式确定是否用"a"或"an"描述对象?

我有一个名词数据库(ex"house","感叹号","苹果"),我需要在我的应用程序中输出和描述.很难用一个自然的句子来描述一个项目而不使用"a"或"an" - "房子很大","感叹号很小"等等.

我可以在PHP中使用任何函数,库或hack来确定用A或AN描述任何给定名词是否更合适?

php grammar

11
推荐指数
3
解决办法
2694
查看次数

在PHP字符串中正确形式的不定冠词(a,an)

是否有一种简单的方法来替换字符串中的/ a以符合以下单词 - 与'S'在日期格式中的工作方式非常相似?

例如

$apple = 'apple';
$pear = 'pear';
echo "This is a $apple, this is a $pear."

--> This is an apple, this is a pear
Run Code Online (Sandbox Code Playgroud)

php string cakephp

6
推荐指数
3
解决办法
1927
查看次数

标签 统计

php ×2

cakephp ×1

grammar ×1

string ×1