Re: single vs. double quotes inside a $_POST{}
- From: Daniel <daniel@xxxxxxxxxxxxx>
- Date: Mon, 18 May 2009 15:14:41 -0500
On Sun, 17 May 2009 22:21:24 -0400, Jerry Stuckle
<jstucklex@xxxxxxxxxxxxx> wrote:
Daniel wrote:
On Sun, 17 May 2009 21:35:40 -0400, Jerry Stuckle
<jstucklex@xxxxxxxxxxxxx> wrote:
Daniel wrote:
On Sat, 16 May 2009 17:20:33 GMT, jdoerr <jdoerr@xxxxxxxxxxx> wrote:It does make a difference. That's why there are two different syntaxes.
What's preferred (or better)?
$_POST['name']
$_POST["name"]
I understand the difference, re: variables (which explains why
$_POST['$tmp'] doesn't work), and I appreciate the corrections on my
prior use of $_POST[name].
thanks.
I don't believe it makes any difference...
Daniel
it does if you need to embed variables in them. But in cases like the
one above, you rarely need to do so... And since the example was
mentinoed with constants, that's it, they kinda work the same...
Daniel
The key here being 'kinda'. Try embedding a '$' in a double quoted
string, for instance, i.e. "They paid $millions for it."
You're absolutely right; but who would put a html input field with
dollars in it? Cause that was about it - $_POST['name'] vs the one wth
double quotes...
Daniel
.
- Follow-Ups:
- Re: single vs. double quotes inside a $_POST{}
- From: Jerry Stuckle
- Re: single vs. double quotes inside a $_POST{}
- References:
- single vs. double quotes inside a $_POST{}
- From: jdoerr
- Re: single vs. double quotes inside a $_POST{}
- From: Daniel
- Re: single vs. double quotes inside a $_POST{}
- From: Jerry Stuckle
- Re: single vs. double quotes inside a $_POST{}
- From: Daniel
- Re: single vs. double quotes inside a $_POST{}
- From: Jerry Stuckle
- single vs. double quotes inside a $_POST{}
- Prev by Date: Re: How to parse query string in CLI?
- Next by Date: Re: PHP / MySQL to Excel - good library recommendation?
- Previous by thread: Re: single vs. double quotes inside a $_POST{}
- Next by thread: Re: single vs. double quotes inside a $_POST{}
- Index(es):
Relevant Pages
|