Reply to Re: php querying

Your name:

Reply:


Posted by Denis Gerina on 06/04/07 22:09

vinnie wrote:
>> Change this
>> echo'<br><br>here are the results: $num_results';
>> to this
>> echo '<br><br>here are the results: '.$num_results;
>>
>
> thanks Geoff, it works perfectly now. But what's the difference? Is
> not the same thing?
>

The difference is that unlike double-quoted strings, single-quoted
strings do not replace variable names inside the quotes with variable
values. The version that works concatenates your string with the value
of $num_results variable.

You could also have written

echo "<br><br>here are the results: $num_results";

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация