![]() |
|
Thread Tools |
#1
|
||||||||
|
||||||||
Should variables contain apostrophes in templates?
Should variables contain apostrophes in templates?
What I mean by this is should they look like this:
or
both seem to work and I have seen many people use with and without in examples, as well as in the templates themselves, but I would like to know if one is safer then the other, whether it is simply user preference or something else entirely. Note to mods: I have accidentally posted this in the wrong forum, it should be in the vB3 General Discussions or vB3 Programming Discussions. No members have liked this post.
Last edited by PinkMilk; 28 Mar 2014 at 08:47. |
#2
|
||||
|
||||
Zend uses quotes... http://framework.zend.com/manual/1.1...ing-style.html
PHP doco says use quotes... http://www.php.net/manual/en/language.types.array.php
__________________
www.AusPhotography.net.au a.k.a. AP is a photography forum where members share their photography, photo editing skills and techniques. We run regular photographic competitions; Rick (site owner) and Kym (site tech) using this account *** Home of the AP fully comprehensive vb4 photographic competition management solution *** The following members like this post: PinkMilk
|
#3
|
|||
|
|||
So basically treat as if they where php.
No members have liked this post.
|
#4
|
|||
|
|||
Right, the stuff in a condition goes pretty much directly into an if statement (although it's checked for function calls that aren't allowed). It's the same in vb4, even though the tag syntax is a little different.
And although you didn't ask about it, variables used in a template (in vb3) go in to a double quoted string, so those rules apply there. The following members like this post: PinkMilk
Last edited by kh99; 29 Mar 2014 at 23:54. Reason: clarified |
![]() |
«
Previous Thread
|
Next Thread
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 21:21.