Zaloguj | Zarejestruj | FAQ

How to have it spaced out?

+ Odpowiedz

Posty: 2 Strona 1 z 1

How to have it spaced out?

przez albertc30 » Cz sty 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.

Kod: Zaznacz cały
$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.
Avatar użytkownika


  • Posty: 1
  • Dołączył(a): Cz sty 28, 2016 12:29 am

Re: How to have it spaced out?

przez Farhin Qureshi » Śr sty 11, 2017 11:58 am

If you use the
Kod: Zaznacz cały
between these three lines then you may able to get the new line for each content.
Avatar użytkownika

Farhin Qureshi

  • Posty: 45
  • Dołączył(a): Wt sty 03, 2017 11:33 am
Farhin Qureshi
.NET Developer

+ Odpowiedz

Strona 1 z 1