Anmelden | Registrieren | FAQ

How to have it spaced out?

+ Antwort erstellen

2 Beiträge Seite 1 von 1

How to have it spaced out?

von albertc30 » Do 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: Alles auswählen
$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.


  • Beiträge: 1
  • Registriert: Do Jan 28, 2016 12:29 am

Re: How to have it spaced out?

von Farhin Qureshi » Mi Jan 11, 2017 11:58 am

If you use the
Code: Alles auswählen
between these three lines then you may able to get the new line for each content.

Farhin Qureshi

  • Beiträge: 45
  • Registriert: Di Jan 03, 2017 11:33 am
Farhin Qureshi
.NET Developer

+ Antwort erstellen

Seite 1 von 1