SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2009
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Give four spaces between two words

    Hi,

    i want to concatenate this:

    foo bar
    But i want to give four spaces between "foo bar".

    I have tried this:

    PHP Code:
    $navigation .= 'foo ';

    $navigation .= ' '
    $navigation .= ' '


    $navigation .= ' bar'
    but i get only 3 spaces between the words.

    Any idea?

    Regards

    Javi

  2. #2
    Visible Ninja bronze trophy
    JeffWalden's Avatar
    Join Date
    Sep 2002
    Location
    Los Angeles
    Posts
    1,709
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Trying using   instead of a [space] in your quotes.
    TAKE A WALK OUTSIDE YOUR MIND.

  3. #3
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,806
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    as Jeff said:
    PHP Code:
    $gap str_repeat(" "4);

    $navigation 'foo'$gap .'bar'
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  4. #4
    SitePoint Enthusiast
    Join Date
    Dec 2009
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •