Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

very basic php and sql test

ajax

  • Please log in to reply
34 replies to this topic

#25 ArtoStiloz

ArtoStiloz

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 104 posts

Posted 18 September 2008 - 02:21 PM

I would advise you not to use the apostrophe in your echo'es and strings.
  • 0
[SIGPIC][/SIGPIC]
Http://www.ArtoStiloz.Dk

#26 Orjan

Orjan

    CC Mentor

  • Moderator
  • 2918 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#

Posted 19 September 2008 - 02:01 AM

why not?
  • 0

#27 morefood2001

morefood2001

    CC Leader

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1011 posts

Posted 19 September 2008 - 11:17 AM

I've found that in some cases, php will interpret the apostrophe as an apostrophe and not a variable in big echo statements. I can't remember where though to give an example. I like to do the ".." which is messier but make the compiler highlight my variables so I can keep track of them.
  • 0
If you enjoy reading this discussion and are thinking about commenting, why not click here to register and start participating in under a minute?

#28 Orjan

Orjan

    CC Mentor

  • Moderator
  • 2918 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#

Posted 19 September 2008 - 02:18 PM

well, for adding variables, I also use the concatenation mark (.) but just wondered about the apostrophes...
  • 0

#29 ArtoStiloz

ArtoStiloz

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 104 posts

Posted 20 September 2008 - 04:48 AM

Because it often creates problems. Especially in the strings. It often creates problems if you use apostrophes in strings or an if string contains numbers.
  • 0
[SIGPIC][/SIGPIC]
Http://www.ArtoStiloz.Dk

#30 morefood2001

morefood2001

    CC Leader

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1011 posts

Posted 20 September 2008 - 07:35 AM

I hate echoing large blocks of code because I normally have to escape all the quotes, etc with \. However if its a single line of code, its probably easier and less clock cycles on the server processor.
  • 0
If you enjoy reading this discussion and are thinking about commenting, why not click here to register and start participating in under a minute?

#31 ArtoStiloz

ArtoStiloz

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 104 posts

Posted 20 September 2008 - 07:42 AM

Well, just use Ctrl+H in notesblock :)
  • 0
[SIGPIC][/SIGPIC]
Http://www.ArtoStiloz.Dk

#32 morefood2001

morefood2001

    CC Leader

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1011 posts

Posted 20 September 2008 - 09:06 AM

Well, just use Ctrl+H in notesblock :)


What do you mean, what program?
  • 0
If you enjoy reading this discussion and are thinking about commenting, why not click here to register and start participating in under a minute?

#33 ArtoStiloz

ArtoStiloz

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 104 posts

Posted 20 September 2008 - 09:30 AM

Dont you have a program called "Notesblok"? - Well.. dunno what its called on an english pc s:
  • 0
[SIGPIC][/SIGPIC]
Http://www.ArtoStiloz.Dk

#34 morefood2001

morefood2001

    CC Leader

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1011 posts

Posted 20 September 2008 - 10:16 AM

I've never heard of that program, I thought you were talking about a note block or something in another program like dreamweaver :P Thanks for clarifying :)
  • 0
If you enjoy reading this discussion and are thinking about commenting, why not click here to register and start participating in under a minute?

#35 Orjan

Orjan

    CC Mentor

  • Moderator
  • 2918 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#

Posted 20 September 2008 - 01:22 PM

he's meaning "notepad" I guess, as I can understand some danish at least, as a neighbour country... but ctrl+H .. "search and replace" what's so special about that?
  • 0





Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download