登录 | 注册 | FAQ
Anonymous

How to have it spaced out?

+ 发表回复

2 篇帖子 分页: 1 / 1


How to have it spaced out?

albertc30 » 周四 1月 28, 2016 1:55 am

Hi all.

I have the code below which returns in one single line and with no spaces, the datetimeipaddress.

How can I have it each in their own line or at least with a space between.

I am not a coder so my knowledge is very limited.

代码: 全选
$body ="We have received the following information:\n\n"; foreach($fields as $a => $b){ $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a],$date);}
$body .= $date;
$body .= $time;
$body .= $ip;


Many thanks.
Albert
头像

albertc30

  • 帖子: 1
  • 注册: 周四 1月 28, 2016 12:29 am

Re: How to have it spaced out?

Farhin Qureshi » 周三 1月 11, 2017 11:58 am

If you use the
代码: 全选
echo("\n");
between these three lines then you may able to get the new line for each content.
头像

Farhin Qureshi

  • 帖子: 45
  • 注册: 周二 1月 03, 2017 11:33 am
--
Farhin Qureshi
.NET Developer
http://www.ifourtechnolab.com


+ 发表回复

分页: 1 / 1