Login | Register | FAQ

How to have it spaced out?

+ Post a reply

2 posts Page 1 of 1

How to have it spaced out?

by albertc30 » Thu Jan 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.

Code: Select all
$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.
User avatar


  • Posts: 1
  • Joined: Thu Jan 28, 2016 12:29 am

Re: How to have it spaced out?

by Farhin Qureshi » Wed Jan 11, 2017 11:58 am

If you use the
Code: Select all
between these three lines then you may able to get the new line for each content.
User avatar

Farhin Qureshi

  • Posts: 45
  • Joined: Tue Jan 03, 2017 11:33 am
Farhin Qureshi
.NET Developer

+ Post a reply

Page 1 of 1