Jump to content

jseddon001

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

About jseddon001

  • Birthday 04/05/1980

Profile Information

  • Gender
    Male
  • Location
    Beautiful sunny, crisp, and scenic leeds

jseddon001's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thank you very much for all your help.
  2. Thanks very much for your help. Just replying to the previous post. is the difference between:- echo "<div style=\"margin:0 auto\">"; and echo '<div style="margin:0 auto">'; just the extra two bytes of info with the backslashes, or can it affect the output? I currently escape everything with a \. As another quick query, When the server reads the webpage and parses the php and echo statements  will using . instead of , and and " instead of '  affect the output of the page or just the speed at which the page is displayed?
  3. Hello; This is my first post, and the question may be a little obvious. I am designing and coding my first website - a completely intereactive php mysql website. Every page uses the databse in some way and is scripted in php. When coding webpages in php, what are the the standards for [b]echo[/b] and [b]print[/b] lines that will appear as the html in the source code? I am currently writing it as this. echo "<div> <div> asdf asdf asdf </div> <h1>asdf asd f</h1> <p>asdf asdf </p> </div> ": Basically, I open an echo tag and put all the coding in between and then close the echo tag. If there is a php variable to include I just include it as echo "<div> <div> asdf asdf asdf </div> <h1>asdf asd f</h1> <p>asdf asdf  my php variable [b]$variable[/b]</p> </div> ": This seems to work on the browser and doesn't affect the output. I read that there are specific ways to write the echo lines in php using ". or '. or "'. etc for variables and \n. for line breaks etc. The current method I'm using works, but I want to make sure that the website is properly coded. Please could someone provide a quick run down of the proper php coding when it comes to using "echo" in amongst the php code. It would be greatly appreciated Thanks very much Jon
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.