Results 1 to 6 of 6
  1. #1
    Join Date
    May 2006
    Location
    Japan
    Posts
    326
    Plugin Contributions
    1

    Default Old code has spaces.

    Ok, I pull up my old php files and more than 80% of them have spaces between each line.

    example


    Code code code

    more code more code more code


    where it should be


    Code code code
    more code more code more code

    Anyone know why this would have happened, is their a quick fix?

  2. #2
    Join Date
    Mar 2006
    Posts
    250
    Plugin Contributions
    0

    Default Re: Old code has spaces.

    If the code was originally written without line breaks, I'm not sure how it might have gotten additional line breaks. Perhaps you're using a different editor which interprets and displays line breaks differently?

    The good news, however, is that PHP is completely white space ignorant. It doesn't care a lick about line breaks, so even if there are new ones it shouldn't matter.

    I hope I've understood your situation correctly, and that this answer helps. If there's an application for which you need the line breaks removed, I might be able to suggest a work around or solution.

    --Joe
    Now J_Schilz
    Integrated Checkout Without Account
    (wiki w/pics, demo, download)

  3. #3
    Join Date
    May 2006
    Location
    Japan
    Posts
    326
    Plugin Contributions
    1

    Default Re: Old code has spaces.

    Its just that using winmerge does see the spaces. If you know a work around about this that would be great. I have just been using dreamweaver to edit. The code works fine but just updating is a pain in the ######## b/c of this line break stuff. Any tip would be great, but I just might start fresh.

    Thanks
    Skin Evolution.
    Lynda.com,its a great place to learn.
    Camelot Hosting,it's where my site calls home!

    E-Start your Zen-Cart,KH is the Man, Thanks for all the hard work!

  4. #4
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: Old code has spaces.

    set winmerge to ignore the blank lines
    Zen cart PCI compliant Hosting

  5. #5
    Join Date
    May 2006
    Location
    Japan
    Posts
    326
    Plugin Contributions
    1

    Default Re: Old code has spaces.

    Well, thats an easy answer...I feel stupid. Thanks as always Merlin...btw, who is your pic of?
    Skin Evolution.
    Lynda.com,its a great place to learn.
    Camelot Hosting,it's where my site calls home!

    E-Start your Zen-Cart,KH is the Man, Thanks for all the hard work!

  6. #6
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: Old code has spaces.

    No Clue, Someone sent it to me to use ALONG time ago
    Zen cart PCI compliant Hosting

 

 

Similar Threads

  1. v151 Weird Code and trying edit old body data but opens erased
    By gws76 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 30 Apr 2013, 01:56 AM
  2. Switching servers. Old has v1.3.8a, new has 1.3.9h
    By pricediscrimination in forum Upgrading from 1.3.x to 1.3.9
    Replies: 4
    Last Post: 18 Nov 2010, 11:58 PM
  3. WARNING: The Admin Activity Log table has records over 2 months old and...
    By Agent_KGB in forum Customization from the Admin
    Replies: 1
    Last Post: 28 Mar 2009, 04:50 PM
  4. Replies: 3
    Last Post: 8 Jul 2008, 02:18 AM
  5. Google Froogle Feeder - has the old attribute field names.
    By keepitreal in forum General Questions
    Replies: 0
    Last Post: 21 Jul 2006, 06:02 AM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR