php - Different behavior based on double or single quote -


i have little question regarding use of double quote , single quote.

when use code below double quotes echo "":

$result_entries = mysqli_query($con,"select * bhost_entries author_u_id='$user_info[u_id]'"); while($entries = $result_entries->fetch_object())   {   echo "   <tr>    <td>    {$entries->title}    </td>   </tr>   ";   } 

..output be

entry1 entry2 entry3 etc.. 

but when use same code single quote echo '' i'll get:

{$entries->title} {$entries->title} {$entries->title} etc.. 

as output.

why behave differently?

appreciate thoughts.

this because main difference between single , double qoutes. single qoutes not parse variables while double qoutes parse variables.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -