|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Clarification about PHP quote marks
Hi,
I notice that both single ( ' ) and double( " ) quote marks can be used in PHP. I'm wondering if there's any specific rule to using these with MySQL input, PHP , and HTML code or if you can just use whatever you prefer? Then I'd like to know what people feel is a better PHP coding style to use. As it is, I can't decide if it's better using \" or just ' in side a text string when required quotes inside of quotes kind of deal. Cheesr, Fozzy |
|
#2
|
|||||
|
|||||
|
Quote:
Either one. Quote:
):Code:
<img src="image.jpg" alt="image" title="image"> $stringWithNoVariables = 'print me out'; $stringWithVariables = "$x is nice"; $sqlQuery = "SELECT * FROM table WHERE title = 'title' "; Quote:
PHP doesn't even look at single quotes (') so the page executes faster. Hope this helps! ![]() |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > Clarification about PHP quote marks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|