LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 05-01-2004, 12:59 PM   #1
Boffy
Member
 
Registered: Jul 2003
Location: Durham, UK
Distribution: Ubuntu 8.04
Posts: 419

Rep: Reputation: 30
PHP More than one space in a string


How do I get this:
echo "Hello World"
to look like this
"Hello World"
and not
"Hello World"
in PHP

BOffy
 
Old 05-01-2004, 01:10 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
I assume you mean in html and not php? Try adding non breaking spaces " ".
 
Old 05-01-2004, 02:06 PM   #3
Boffy
Member
 
Registered: Jul 2003
Location: Durham, UK
Distribution: Ubuntu 8.04
Posts: 419

Original Poster
Rep: Reputation: 30
I've just realised that your site has modified the things I typed. It should say
echo "Hello___________world"
why does it come out as
"Hello_world"
(where _ is a space)

Boffy

Last edited by Boffy; 05-01-2004 at 02:08 PM.
 
Old 05-01-2004, 02:13 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
It is actually nothing to do with this site it is to do with html and the way it is rendered - thats why I suggested using non breaking spaces:
Code:
Hello     World
Will show as
Hello     World
 
Old 05-01-2004, 02:54 PM   #5
Boffy
Member
 
Registered: Jul 2003
Location: Durham, UK
Distribution: Ubuntu 8.04
Posts: 419

Original Poster
Rep: Reputation: 30
Thanks a lot - again.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get rid of the begining and end space of a string for PERL?? cqmyg5 Slackware 2 04-28-2005 04:34 PM
PHP string replace question. apt Programming 1 04-26-2005 07:47 PM
optimize PHP string function Cedrik Programming 6 08-29-2004 09:07 AM
PHP delete letter from string Boffy Programming 2 04-30-2004 12:12 PM
PHP random additions to query string Riley Programming 2 07-09-2003 02:38 PM


All times are GMT -5. The time now is 01:41 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration