[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 209
  • Last Modified:

PHP - Echo removes additional spaces

Hi,

I am giving a simple Echo command like this:

echo "Hello             Test"

But what gets displayed on the browser is

Hello Test

Basically its removing the extra white spaces in between the words 'Hello' & 'Test', is there something i can do to avoid this?

Thanks in advance

Cheers

Vasan
0
Vasan
Asked:
Vasan
1 Solution
 
ludofulopCommented:
you have to replace spaces with html entity   :
echo str_replace(' ', ' ', "Hello             Test");
0
 
InsoftserviceCommented:
hi,

You can try

echo "Hello       test";
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now