Syntax/punctuation help

Discussion in 'PHP' started by SeriousNovice, Mar 8, 2008.

  1. #1
    Thank you in advance for any assistance. I am pretty new at this and I am having a terrible time with punctuation problems.

    My current problem is writing a script to print the variables from a query in an HTML table, along with text that describes what the variable is (e.g if I want to print the date of a speaking event the script has to ultimately print "DATE: $date" in a cell and the topic information needs to read "TOPIC: 'topic" in another cell. And it has to do this in a table row, so the HTML has to come from the script as well.

    I have experimented with multiple combinations of single-quotes ', double-quotes", parentheses () and square brackets [] because in searching through the books I have, as well as through Google results, I've seen various combinations of the above in use for this sort of routine. I am having no luck.

    Is there a style manual somewhere for PHP, or some hard-and-fast rules that can be read somewhere? My books don't seem to have such a thing and they seem to break their own rules as frequently as they adhere to the rules.

    I can't be alone with this, can I? I have learned three or four languages over the years (none of them to the skill level possessed by many people here, though), but I'm not totally dense.

    Any help will be appreciated. Thank you.


    Steve E.
     
    SeriousNovice, Mar 8, 2008 IP
  2. Altari

    Altari Peon

    Messages:
    188
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Could you give an example? Maybe some code?

    Third try...to edit...

    Are you pulling from a database and echoing data?
     
    Altari, Mar 8, 2008 IP
  3. SeriousNovice

    SeriousNovice Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Good morning, Altari -

    I went to bed just after posting. Let me get a couple of code samples, and the error messages they generated, and I'll post that in an hour or two. And yes, the variables are returned from a query to a MySQL database. The query works - I can print their values if I don't try to print anything else.

    Thank you...back in a bit.


    Steve E.
     
    SeriousNovice, Mar 9, 2008 IP