- Original Message
From: Nathan Nobbe <[EMAIL PROTECTED]>
To: Lamp Lists <[EMAIL PROTECTED]>
Cc: php-general@lists.php.net
Sent: Thursday, March 20, 2008 11:35:42 AM
Subject: Re: [PHP] why use {} around vraiable?
On Thu, Mar 20, 2008 at 12:22 PM, Lamp Lists <[EMAIL PR
On Mar 20, 2008, at 922AM, Lamp Lists wrote:
$query = mysql_query("SELECT * FROM table1 WHERE id='{$session_id}'");
For a non-array value, the curly braces are unnecessary:
$query = mysql_query("SELECT * FROM table1 WHERE id='$session_id'")
WIth an array element, you have to either us
On 20/03/2008, Lamp Lists <[EMAIL PROTECTED]> wrote:
> hi,
> I saw several times that some people use this
>
> $parameters = array(
> 'param1' => "{$_POST["param1"]}",
> 'param2' => "{$_POST["param2"]}"
> );
>
> or
>
> $query = mysql_query("SELECT * FROM table1 WHERE id='{$session_id}'")
Lamp Lists wrote:
hi,
I saw several times that some people use this
$parameters = array(
'param1' => "{$_POST["param1"]}",
'param2' => "{$_POST["param2"]}"
);
or
$query = mysql_query("SELECT * FROM table1 WHERE id='{$session_id}'");
I would use:
$parameters = array(
'param1' => $_P
On Thu, Mar 20, 2008 at 12:22 PM, Lamp Lists <[EMAIL PROTECTED]> wrote:
> hi,
> I saw several times that some people use this
>
> $parameters = array(
> 'param1' => "{$_POST["param1"]}",
> 'param2' => "{$_POST["param2"]}"
> );
>
> or
>
> $query = mysql_query("SELECT * FROM table1 WHERE id='{$s
On Mar 20, 2008, at 12:22 PM, Lamp Lists wrote:
hi,
I saw several times that some people use this
$parameters = array(
'param1' => "{$_POST["param1"]}",
'param2' => "{$_POST["param2"]}"
);
or
$query = mysql_query("SELECT * FROM table1 WHERE id='{$session_id}'");
I would use:
$parameters =
On Thu, 2008-03-20 at 09:22 -0700, Lamp Lists wrote:
> hi,
> I saw several times that some people use this
>
> $parameters = array(
> 'param1' => "{$_POST["param1"]}",
> 'param2' => "{$_POST["param2"]}"
> );
Ignorance.
> or
>
> $query = mysql_query("SELECT * FROM table1 WHERE id='{$sess
hi,
I saw several times that some people use this
$parameters = array(
'param1' => "{$_POST["param1"]}",
'param2' => "{$_POST["param2"]}"
);
or
$query = mysql_query("SELECT * FROM table1 WHERE id='{$session_id}'");
I would use:
$parameters = array(
'param1' => $_POST["param1"],
'par
8 matches
Mail list logo