Thanks for the pointers...

Another quick ?.

Im rewriting a rather large script, and I read somewhere that an 
application would run slightly faster if you drop out of php to display 
html.
So like

<?php
=== php code goes here ===
?>
</td></tr></table>
<?php
=== php code goes here ===
?>

If the application is rather large, does the constant jumping in and out 
of php slow it down?
Or if you use *echo* with single quotes to display literal meanings like
echo '</td></tr></table>';
suffice??

That should be it.
Thanks

Miles Thompson wrote:

> This should work ...
> $result=mysql_query("SELECT book FROM TAB_AUTHORS  WHERE aid = '$aid'");
> 
> When PHP sees the single quotes around the $aid it evaluates it to the 
> value stored in the variable.
> Your first example connntained $aid within a set of double quotes, thus 
> it was treated as a literal.
> 
> Hope this helps - Miles Thompson
> 
> At 09:08 AM 12/12/2001 -0500, Gerard Samuel wrote:
> 
>> Im tring to rewrite some code to use single/double quotes correctly (as
>> correct as can be).
>>
>> If I use
>> $result=mysql_query('SELECT book FROM ' . TAB_AUTHORS . " WHERE aid =
>> $aid");
>> I get an mysql error.  That should be correct, if I understand it right.
>>
>> But if I use
>> $result=mysql_query('SELECT book FROM ' . TAB_AUTHORS . " WHERE aid =
>> '$aid'");
>> it works.
>>
>>
>> So what I need to know is that do I have to ride the fine thin line for
>> correctness and speed???
>>
>>
>> -- 
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 
> 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to