<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Web Design company - Goweb99 blog &#187; php echo</title>
	<atom:link href="http://www.goweb99.com/blog/tag/php-echo/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.goweb99.com/blog</link>
	<description>Get your website designed for as low as $99.</description>
	<lastBuildDate>Fri, 30 Jul 2010 20:27:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using echo</title>
		<link>http://www.goweb99.com/blog/php-tutorial/using-echo/</link>
		<comments>http://www.goweb99.com/blog/php-tutorial/using-echo/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 10:33:57 +0000</pubDate>
		<dc:creator>tutor</dc:creator>
				<category><![CDATA[PHP Tutorial]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php echo]]></category>
		<category><![CDATA[php strings]]></category>
		<category><![CDATA[PHP Tuts]]></category>

		<guid isPermaLink="false">http://www.goweb99.com/blog/?p=376</guid>
		<description><![CDATA[As we used in previous pages, the PHP command echo is a way to uotput text to the web browser. Echo is the most commonly, and most ofetenly used command while working in PHP
We use echo to output a string. You can either use a variable or the string itself within quotes.
For eg:
&#60;?php
$myString = &#8220;PHP&#8221;;
echo [...]]]></description>
			<content:encoded><![CDATA[<p>As we used in previous pages, the PHP command echo is a way to uotput text to the web browser. Echo is the most commonly, and most ofetenly used command while working in PHP</p>
<p>We use echo to output a string. You can either use a variable or the string itself within quotes.</p>
<div class="example">For eg:</p>
<p>&lt;?php<br />
$myString = &#8220;PHP&#8221;;<br />
echo $myString;<br />
echo &#8220;&lt;h5&gt;PHP is too good!&lt;/h5&gt;&#8221;;<br />
?&gt;</p></div>
<div class="example">
Output:</p>
<p>PHP<br />
PHP is too good!</p></div>
<p>The text that we output through echo is sent to the user in the form of a web page. So we can also use HTML tags inside the echo command,</p>
<p><strong>Careful When Echoing Quotes!</strong></p>
<p>It seems very good to be able to output HTML with PHP. However, you must be careful when using HTML code, when it contains quotes. Echo uses quotes to mark the beginning and end of the string, so you must not use quotes other than at the starting and the ending. If its necessary to use quotes inside echo you must use one of these methods</p>
<p>Use escape sequence to escape your quotes from echo ie just put a backslash directly before the quotation mark, like  \&#8221;</p>
<p>Use single quotes (apostrophes) for quotes inside your string like ‘    ’.</p>
<div class="example">&lt;?php<br />
Echo “&lt;h5 class=”specialH5”&gt;I Love PHP!&lt;/h5&gt;		//doesn’t work<br />
echo &#8220;&lt;h5 class=\&#8221;specialH5\&#8221;&gt;I love using PHP!&lt;/h5&gt;&#8221;;	//works<br />
?&gt;</div>
<p><strong>Echoing Variables</strong></p>
<p>While echoing variables in PHP no quotations are required. They are written directly with echo as:</p>
<div class="example">For eg:</p>
<p>&lt;?php<br />
$my_string = &#8220;PHP is too good  &#8221;;<br />
$my_number = 4;<br />
$my_letter = U;<br />
echo $my_string;<br />
echo $my_number;<br />
echo $my_letter;<br />
?&gt;</p></div>
<div class="example">
Output:</p>
<p>PHP is too good 4U</p></div>
<p><strong>Echoing Variables and Text Strings</strong></p>
<p>You can also place variables inside of double-quoted strings. This tells the PHP interpreter to output the string value of the variable to be printed in the place of the variable.</p>
<div class="example">
For eg:</p>
<p>&lt;?php<br />
$my_string = &#8220;PHP is too good&#8221;;<br />
echo &#8220;$my_string to use &lt;br /&gt;&#8221;;<br />
echo &#8220;PHP is a scripting language $my_string &lt;br /&gt;&#8221;;<br />
echo &#8220;PHP is a scripting language $my_string to use&#8221;;<br />
?&gt;</p></div>
<div class="example">
Output:</p>
<p>PHP is too good to use<br />
PHP is a scripting language PHP is too good<br />
PHP is a scripting language PHP is too good to use</p></div>
<p>Using variables saves time and provide reusability, you don’t need to retype the whole string over and again whenever you want to use it. With variables you can just use the variable whrever theres a need to use the same variable. It makes the code readable.</p>
<p>You should always use double quotes with string variables, as single quotes will not give the value of the string rather it will just print the variable name like</p>
<p>$my_string</p>
]]></content:encoded>
			<wfw:commentRss>http://www.goweb99.com/blog/php-tutorial/using-echo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
