dotibrb048760 2016-09-06 17:32
浏览 73
已采纳

除了第一个单词之外,将字符串数组的所有字符串都设置为小写

Supposing I have an array Tomat, Ost How can I accomplish so it is like this: Tomat, ost?

$ingredient_a = Array('Tomat', 'Ost');
echo implode(', ', $ingredient_a);
  • 写回答

2条回答 默认 最新

  • dongxinche1264 2016-09-06 17:47
    关注

    Use ucfirst and array_map with strtolower

    echo ucfirst(implode(', ', array_map('strtolower',$ingredient_a)));
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?