4 Replies - 852 Views - Last Post: 23 September 2016 - 01:18 PM Rate Topic: -----

#1 mark 1090   User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 6
  • Joined: 23-September 16

Php echo " "; not printing whitespace

Posted 23 September 2016 - 01:04 PM

<?php
echo "xxxxx"." "."****";
?>
Why does this output xxxxxx**** with no space in between
Im using xampp with sublime
Is This A Good Question/Topic? 0
  • +

Replies To: Php echo " "; not printing whitespace

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 16479
  • View blog
  • Posts: 65,313
  • Joined: 12-June 08

Re: Php echo " "; not printing whitespace

Posted 23 September 2016 - 01:05 PM

You didn't add any spaces in there.. just concatenated a few strings.
Was This Post Helpful? 0
  • +
  • -

#3 mark 1090   User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 6
  • Joined: 23-September 16

Re: Php echo " "; not printing whitespace

Posted 23 September 2016 - 01:08 PM

how do i add a space inbetween?
In other words how do i print a space?
Pls help

This post has been edited by Dormilich: 26 September 2016 - 12:51 AM

Was This Post Helpful? -1
  • +
  • -

#4 xclite   User is offline

  • I wrote you an code
  • member icon


Reputation: 1528
  • View blog
  • Posts: 4,448
  • Joined: 12-May 09

Re: Php echo " "; not printing whitespace

Posted 23 September 2016 - 01:10 PM

Moved to the PHP forum.
Was This Post Helpful? 0
  • +
  • -

#5 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 16479
  • View blog
  • Posts: 65,313
  • Joined: 12-June 08

Re: Php echo " "; not printing whitespace

Posted 23 September 2016 - 01:18 PM

Put a space before an ending " or concatenate a space in there.. like "asdfasdf"." "."asdfasdfasdf"
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1