Convert the first element of an array to a string in PHP

后端 未结 13 1743
盖世英雄少女心
盖世英雄少女心 2020-12-05 02:00

I have a PHP array and want to convert it to a string.

I know I can use join or implode, but in my case array has only one item. Why do I

13条回答
  •  庸人自扰
    2020-12-05 02:41

    Use the inbuilt function in PHP, implode(array, separator):

    
    

    Result: parth/raja/nikhar

提交回复
热议问题