PHP MYSQL fetching a TEXT with new lines

后端 未结 3 702
慢半拍i
慢半拍i 2020-12-11 06:18


        
3条回答
  •  执笔经年
    2020-12-11 06:57

    Also you can use:
    REPLACE(`col_name`,"\n","
    ") as `col_name`

    You must use this after SELECT.

    Example code:
    SELECT *, REPLACE(`name`,"\n","
    ") as `name` FROM xyz WHERE id="%s"

提交回复
热议问题