SitePoint Sponsor

User Tag List

Results 1 to 22 of 22
  1. #1
    SitePoint Enthusiast scottyparks's Avatar
    Join Date
    Apr 2001
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    echo problem!!!!!!!!!!!!!!!!!!!

    Hello friends,
    I am trying to echo this "hello how you've been?" using

    echo("hello how you've been?"); but I geta "prase" error.

    if you help me that is kind of you thanks!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great another webmaster site, let me be the first to say Congratulations on your brilliant new idea! Can't wait till launch


    http://www.php.net/echo
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2001
    Location
    London
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello,
    scottyparks your code is perfectlly fine, check to see whether you have put <?php and ?> to open and close your script and it should work.
    -- | StEaLThEn |--

  4. #4
    SitePoint Guru
    Join Date
    Aug 2001
    Location
    Amsterdam
    Posts
    788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    have you tried it like this:
    Code:
    echo "hello how you/'ve been? ";
    Or what I think is easier is just not use the echo.

    close php and reopen.. You can do that at virtually any point in the code

    ?>
    Hello how you've been?
    <?


    Well good luck
    the neigbours (free) WIFI makes it just a little more fun

  5. #5
    SitePoint Zealot
    Join Date
    Aug 2001
    Location
    North Carolina
    Posts
    153
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If the other responses don't do it for you, check with your host.

    One of my clients has a site on a horrible setup...

    The file.php must be chmod o+x (ok, i can live with that)

    Any to be called explicity by the browser, page.php must begin with a:
    Code:
    #!/usr/local/bin/php
    Andrew Thompson
    VPHost.com, part of the Untapped Resources Network.

  6. #6
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One WORD ---------- UNBELIEVABLE ----------------
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  7. #7
    SitePoint Wizard Defender1's Avatar
    Join Date
    Apr 2001
    Location
    My Computer
    Posts
    2,808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Slade
    If the other responses don't do it for you, check with your host.

    One of my clients has a site on a horrible setup...

    The file.php must be chmod o+x (ok, i can live with that)

    Any to be called explicity by the browser, page.php must begin with a:
    Code:
    #!/usr/local/bin/php
    Someone's been smokin too much perl.
    Defender's Designs
    I'm Getting Married!

    Not-so-patiently awaiting Harry Potter Book 7 *sigh*

  8. #8
    SitePoint Addict rwar's Avatar
    Join Date
    Sep 2001
    Location
    PF / RS / BR
    Posts
    207
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you tried with

    PHP Code:
    print ("..."); 
    php? mysql? apache? That's it.

  9. #9
    SitePoint Wizard Defender1's Avatar
    Join Date
    Apr 2001
    Location
    My Computer
    Posts
    2,808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    or
    PHP Code:
    echo " "
    Defender's Designs
    I'm Getting Married!

    Not-so-patiently awaiting Harry Potter Book 7 *sigh*

  10. #10
    SitePoint Enthusiast scottyparks's Avatar
    Join Date
    Apr 2001
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hello sitepont friends thanks for the help so far!!!!!! when I took away the " ' " the script worked PERFECT! Thank again!

    freddydoesphp yuo were very nice to reply so fast but please dont make fun of my site you have not seen it YET!!!! Me and Mark my best friend who is a master of HTML(4!) will make it very unique and good and maybe even bettar than SITEPOINT! but until than sitepoint will be #1 and maybe my site wil be #2!!!! if yuo want to help just EMAIL ME!! So freddydoesphp dont be so rude next time thanks!!


    BYE!

  11. #11
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not being rude, just stating the facts.

    Which are:

    1) There are way too many so-called "webmaster resource sites" out there

    2) How can we trust your site will be any better then the rest, when its obvious you need help in the area of grammar.

    3)Your knowledge of PHP is so bad, I would suggest learning the basics before planning to build an entire site.


    Good Luck!
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  12. #12
    SitePoint Zealot
    Join Date
    Aug 2001
    Location
    North Carolina
    Posts
    153
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by freddydoesphp
    3)Your knowledge of PHP is so bad, I would suggest learning the basics before planning to build an entire site.[/B]
    This one I might disagree with you on. I got where I am now(which isn't that far, but better than zilch) by tackling a whole site, converting it from static html to php.
    Andrew Thompson
    VPHost.com, part of the Untapped Resources Network.

  13. #13
    Happy Holidays !! Paul S's Avatar
    Join Date
    Mar 2001
    Location
    Mexico
    Posts
    1,287
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Slade
    Any to be called explicity by the browser, page.php must begin with a:
    Code:
    #!/usr/local/bin/php
    mmm, PHP cgi version, ask your client to change to the module one (only if the server is Apache). Maybe he's worry about security.

  14. #14
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by freddydoesphp
    How can we trust your site will be any better then the rest, when its obvious you need help in the area of grammar.
    How can we trust your site will be any better than the rest, when it's obvious you need help in the area of grammar.
    - Matt ** Ignore old signature for now... **
    Dr.BB - Highly optimized to be 2-3x faster than the "Big 3."
    "Do not enclose numeric values in quotes -- that is very non-standard and will only work on MySQL." - MattR

  15. #15
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yeah yeah yeah
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  16. #16
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sorryy man, coyldn't resirsrt.

  17. #17
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hehe! Goofy people.
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  18. #18
    SitePoint Guru
    Join Date
    Aug 2001
    Location
    Amsterdam
    Posts
    788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    don't wanna be rude...

    Originally posted by scottyparks
    hello sitepont friends thanks for the help so far!!!!!! when I took away the " ' " the script worked PERFECT! Thank again!

    freddydoesphp yuo were very nice to reply so fast but please dont make fun of my site you have not seen it YET!!!! Me and Mark my best friend who is a master of HTML(4!) will make it very unique and good and maybe even bettar than SITEPOINT! but until than sitepoint will be #1 and maybe my site wil be #2!!!! if yuo want to help just EMAIL ME!! So freddydoesphp dont be so rude next time thanks!!


    BYE!
    Sorry scottyparks,

    But I have to agree with Freddy on this one... And if you have taken away the ' that isn't really a solution because what will you do next time ??? still use the echo and just not type stuff that need ' ???
    I'm a beginner aswell but I had the luck to be working with a friend who gets paid to program but otherwise I wouldn't even have started making a site fully in php.. or only with a lot of help from these forums..

    So I'd be listening to free advise..

    Good luck with your site anyhow and If there is a question please keep posting

    Peanuts
    the neigbours (free) WIFI makes it just a little more fun

  19. #19
    SitePoint Addict rwar's Avatar
    Join Date
    Sep 2001
    Location
    PF / RS / BR
    Posts
    207
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by freddydoesphp
    Not being rude, just stating the facts.

    Which are:

    2) How can we trust your site will be any better then the rest, when its obvious you need help in the area of grammar.


    What about those people are not from an "English" country? I know the grammar is essencial nowadays. But if one understand the other, I don't care about the grammar. Some guys from Netherland and USA were visiting Brasil (yes, here is Brasil with s) some time ago and we understand each other perfectly, not caring about the "grammar" (talking one to each other), so...

    [/B][/QUOTE]

    3)Your knowledge of PHP is so bad, I would suggest learning the basics before planning to build an entire site.

    [/B][/QUOTE]

    I am a newbie, but I hope you (mentor guys and others) continue answering for us, ok?

    php? mysql? apache? That's it.

  20. #20
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay let me spell it out:

    PHP Code:
    echo("hello how you've been?"); 
    This will not produce a parse error. The single quote is encapsulated by double quotes. That is my exact point, there are people out there claiming they are going to make a webmaster resource site like no other. And then a question like this is asked, and I wonder how the poor fella even got php running.

    Like I said before and stand by now, please learn the basics before trying to build an entire site. And also learn how to ask questions on this forum, and thirdly at all cost try and debug your own code. I mean that line by itself would have produced no errors and could have been narrowed down by simply putting

    PHP Code:
    <?php
    echo("hello how you've been?");
    ?>
    in a php file and running it through a browser.

    Have a nice day
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  21. #21
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by DR_LaRRY_PEpPeR


    How can we trust your site will be any better than the rest, when it's obvious you need help in the area of grammar.
    How can we trust your site will be any better than the rest, when it's obvious you need help in the area of grammar?

    I just couldn't resist.

  22. #22
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by qslack
    How can we trust your site will be any better than the rest, when it's obvious you need help in the area of grammar?

    I just couldn't resist.
    ha ha. no, Quinn, i thought about putting a ? at the end, but he wasn't really ASKING a question, so a period is fine i think. whatever i guess.


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
  •