Login | Register | FAQ
Anonymous

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.
Albert
User avatar

albertc30

  • 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
echo("\n");
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
http://www.ifourtechnolab.com


+ Post a reply

Page 1 of 1