Re: [PHP] why use {} around vraiable?

2008-03-20 Thread Lamp Lists
- 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

Re: [PHP] why use {} around vraiable?

2008-03-20 Thread Brady Mitchell
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

Re: [PHP] why use {} around vraiable?

2008-03-20 Thread Robin Vickery
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}'")

Re: [PHP] why use {} around vraiable?

2008-03-20 Thread Ray Hauge
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

Re: [PHP] why use {} around vraiable?

2008-03-20 Thread Nathan Nobbe
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

Re: [PHP] why use {} around vraiable?

2008-03-20 Thread Jason Pruim
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 =

Re: [PHP] why use {} around vraiable?

2008-03-20 Thread Robert Cummings
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

[PHP] why use {} around vraiable?

2008-03-20 Thread Lamp Lists
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