<?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>scriptygoddess &#187; Lessons learned</title>
	<atom:link href="http://www.scriptygoddess.com/archives/category/lessons-learned/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scriptygoddess.com</link>
	<description></description>
	<lastBuildDate>Thu, 08 Dec 2011 18:23:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>WordPress emails being sent by {username}@box###.bluehost.com (fix)</title>
		<link>http://www.scriptygoddess.com/archives/2011/02/09/wordpress-emails-being-sent-by-usernamebox-bluehost-com-fix/</link>
		<comments>http://www.scriptygoddess.com/archives/2011/02/09/wordpress-emails-being-sent-by-usernamebox-bluehost-com-fix/#comments</comments>
		<pubDate>Thu, 10 Feb 2011 06:25:24 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[bluehost]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[Lessons learned]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress: Lessons Learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1671</guid>
		<description><![CDATA[If you are hosted on Bluehost and you&#039;re using WordPress, you might have noticed the strange &#034;from&#034; address in the emails WordPress appears to be sending out. (they might look something like something@box123.bluehost.com) There is a very simple fix. The way Bluehost servers are setup, the address &#034;wordpress@{YOURDOMAIN.COM}&#034; needs to actually exist somehow in your [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>If you are hosted on Bluehost and you&#039;re using WordPress, you might have noticed the strange &#034;from&#034; address in the emails WordPress appears to be sending out. (they might look something like something@box123.bluehost.com) There is a very simple fix. The way Bluehost servers are setup, the address &#034;wordpress@{YOURDOMAIN.COM}&#034; needs to actually exist somehow in your account. Whether it be an actual email box, forwarder, autoresponder &#8211; either of those will work. However, do NOT set it up as an autoresponder that gives an error (that will completely shut down the emails going out). If you don&#039;t want people replying to &#034;wordpress@{YOURDOMAIN.COM}&#034; &#8211; you can just set up an autoresponder that says something like &#034;Sorry &#8211; no one here&#034;</p>
<p>If you don&#039;t like the &#034;wordpress@yourdomain.com&#034; email format either &#8211; you can change that address via a plugin like: <a href="http://wordpress.org/extend/plugins/wp-mailfrom/">wp-mailfrom</a>. However, again &#8211; whatever address you set it to in there &#8211; still needs to exist in your account. So if you prefer to have the from emails be ilovewordpress@yourdomain.com; make sure there is a ilovewordpress@yourdomain.com email account, forwarder or autoresponder.</p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2011/02/09/wordpress-emails-being-sent-by-usernamebox-bluehost-com-fix/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Download all images on a web page</title>
		<link>http://www.scriptygoddess.com/archives/2010/12/16/download-all-images-on-a-web-page/</link>
		<comments>http://www.scriptygoddess.com/archives/2010/12/16/download-all-images-on-a-web-page/#comments</comments>
		<pubDate>Fri, 17 Dec 2010 06:38:35 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[How to's]]></category>
		<category><![CDATA[Lessons learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1654</guid>
		<description><![CDATA[Once upon a time, you used to be able to download all images that were on a page using the Firefox Web Developer Toolbar addon. It&#039;s been a long time since it worked correctly. You can still download regular images on a page, but any image that is called via CSS (background images, etc.) won&#039;t [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Once upon a time, you used to be able to download all images that were on a page using the Firefox Web Developer Toolbar addon. It&#039;s been a long time since it worked correctly. You can still download regular images on a page, but any image that is called via CSS (background images, etc.) won&#039;t be included in what the Web Developer toolbar&#039;s &#034;Images -&gt; View Image Information&#034; shows.</p>
<p>Of course there&#039;s another way &#8211; but I never knew it until recently. It&#039;s incredibly simple and built right into Firefox. Just right-click on a page, select &#034;view page info&#034; from the menu. Then on the pop-up click the &#034;media&#034; tab. That will list all the images on the page, both ones called from the HTML and the CSS.</p>
<p><img class="aligncenter size-medium wp-image-1659" title="Screen shot 2010-12-16 at Dec 16  8.53.19 PM" src="http://www.scriptygoddess.com/wp-content/uploads/2010/12/Screen-shot-2010-12-16-at-Dec-16-8.53.19-PM-300x300.png" alt="" width="300" height="300" /></p>
<p>You can click on individual image and then click &#034;Save As&#034; to download one in particular you want. Or if you want all of them, hold down the shift key and select all the lines. Then click &#034;save as&#034; to save them down to your computer.</p>
<p><img class="aligncenter size-medium wp-image-1660" title="Screen shot 2010-12-16 at Dec 16  9.08.07 PM" src="http://www.scriptygoddess.com/wp-content/uploads/2010/12/Screen-shot-2010-12-16-at-Dec-16-9.08.07-PM-300x300.png" alt="" width="300" height="300" /></p>
<p>I found this tip here: <a href="http://www.webdeveloper.com/forum/showthread.php?t=212610">http://www.webdeveloper.com/forum/showthread.php?t=212610</a></p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2010/12/16/download-all-images-on-a-web-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Common Mistakes: Images not showing up in IE</title>
		<link>http://www.scriptygoddess.com/archives/2010/12/07/common-mistakes-images-not-showing-up-in-ie/</link>
		<comments>http://www.scriptygoddess.com/archives/2010/12/07/common-mistakes-images-not-showing-up-in-ie/#comments</comments>
		<pubDate>Tue, 07 Dec 2010 17:14:14 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[Lessons learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1656</guid>
		<description><![CDATA[If you have a webpage that has an image on it &#8211; and it displays fine in Firefox, Safari, and Chrome &#8211; but in IE it&#039;s not showing up &#8211; or it&#039;s showing up with that little icon with the red &#034;x&#034; in it &#8211; Check to make sure the image wasn&#039;t saved in CMYK [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>If you have a webpage that has an image on it &#8211; and it displays fine in Firefox, Safari, and Chrome &#8211; but in IE it&#039;s not showing up &#8211; or it&#039;s showing up with that little icon with the red &#034;x&#034; in it &#8211; Check to make sure the image wasn&#039;t saved in CMYK format. Amazingly enough, the other browsers still manage to display the image, but IE always chokes.</p>
<p>If you have Adobe Photoshop, to make this change, go to the &#034;Image&#034; menu, select &#034;Mode&#034; then see if &#034;CMYK&#034; is checked. If so, select &#034;RGB&#034; to change the color mode. Save and upload your image again and make sure you&#039;re linking to the new version.</p>
<p><img class="aligncenter size-full wp-image-1657" title="Photoshop - Images saved as CMYK" src="http://www.scriptygoddess.com/wp-content/uploads/2010/12/Screen-shot-2010-12-07-at-Dec-7-9.10.32-AM.png" alt="" width="357" height="194" /></p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2010/12/07/common-mistakes-images-not-showing-up-in-ie/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Test Credit Card Numbers</title>
		<link>http://www.scriptygoddess.com/archives/2010/05/29/test-credit-card-numbers/</link>
		<comments>http://www.scriptygoddess.com/archives/2010/05/29/test-credit-card-numbers/#comments</comments>
		<pubDate>Sun, 30 May 2010 03:09:33 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[Lessons learned]]></category>
		<category><![CDATA[shopping cart]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1639</guid>
		<description><![CDATA[When you are working with an online store, sometimes you need to enter a credit card number that will pass the &#034;logic&#034; of how the card number should be structured so that you can test the flow of your site. These card numbers are not valid for purchase, and if validated against a gateway &#8211; [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>When you are working with an online store, sometimes you need to enter a credit card number that will pass the &#034;logic&#034; of how the card number should be structured so that you can test the flow of your site. These card numbers are not valid for purchase, and if validated against a gateway &#8211; it will return as being invalid &#8211; however, that&#039;s fine if all you&#039;re testing is the front end process of the store (before the gateway). In cleaning out my office today, I found a few numbers I used to use for this purpose. I can&#039;t remember if all of them worked (and the next time I have to run a test, I&#039;ll remove any I use that seem not to) &#8211; but wanted to keep these safer than in the dark corners of my office closet&#8230; </p>
<p>Visa:<br />
4444 3333 2222 1111</p>
<p>MasterCard:<br />
5424 0000000000 15<br />
(there&#039;s 10 zero&#039;s in there)</p>
<p>Discover:<br />
6011 0000000000 12<br />
(Again, 10 zero&#039;s)</p>
<p>Amex:<br />
37 000000000000 2<br />
(12 zero&#039;s in there)</p>
<p>There&#039;s also a bunch of other <a href="http://www.paypal.com/en_US/vhelp/paypalmanager_help/credit_card_numbers.htm">test credit card numbers here</a> in case you need them.</p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2010/05/29/test-credit-card-numbers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CSS for iPhone&#039;s eyes only (watch out for the cache)</title>
		<link>http://www.scriptygoddess.com/archives/2010/04/14/css-for-iphones-eyes-only-watch-out-for-the-cache/</link>
		<comments>http://www.scriptygoddess.com/archives/2010/04/14/css-for-iphones-eyes-only-watch-out-for-the-cache/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 04:21:07 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS related]]></category>
		<category><![CDATA[Lessons learned]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1636</guid>
		<description><![CDATA[On a project I was working on recently, I was pulling in some css for iPhone users using PHP with the following code: &#60;php if (strpos($_SERVER['HTTP_USER_AGENT'],"iPhone")) { ?&#62; ... CUSTOM CSS FOR IPHONE... &#60;php } ?&#62; This will also work for iPhones and iPod Touch: &#60;php if (strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') &#124;&#124; strstr($_SERVER['HTTP_USER_AGENT'],'iPod')) { ?&#62; ... CUSTOM CSS... [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>On a project I was working on recently, I was pulling in some css for iPhone users using PHP with the following code:</p>
<p><code>&lt;php if (strpos($_SERVER['HTTP_USER_AGENT'],"iPhone")) { ?&gt;<br />
... CUSTOM CSS FOR IPHONE...<br />
&lt;php } ?&gt;</code></p>
<p>This will also work for iPhones and iPod Touch:</p>
<p><code>&lt;php if (strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'],'iPod')) { ?&gt;<br />
... CUSTOM CSS...<br />
&lt;php } ?&gt;</code></p>
<p>That&#039;s great and all &#8211; but then suddenly one day it stopped working. Going back through what changed on the site, I realized one thing we added was a cache plugin. DOH! So the page gets cached without the custom CSS for the iPhone &#8211; the iPhone calls up the site but gets served the cached page (non-iPhone version)&#8230; Yeah, that would do it.</p>
<p>So I found <a href="http://www.boutell.com/newfaq/creating/iphone.html">this solution</a>:</p>
<p><code>&lt;!--[if !IE]&gt;--&gt;<br />
    &lt;style type="text/css"&gt;<br />
	@media only screen and (max-device-width: 480px) {<br />
.... CUSTOM CSS HERE....<br />
	}<br />
	&lt;/style&gt;<br />
&lt;!--&lt;![endif]--&gt;</code></p>
<p>or of course you can pull in a whole stylesheet for the iphone:</p>
<p><code>&lt;!--[if !IE]&gt;--&gt;<br />
&lt;link media="only screen and (max-device-width: 480px)"  rel="stylesheet" type="text/css" href="iphone.css" /&gt;<br />
&lt;!--&lt;![endif]--&gt;</code></p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2010/04/14/css-for-iphones-eyes-only-watch-out-for-the-cache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>swfobject &#8211; flash doesn&#039;t load in Firefox</title>
		<link>http://www.scriptygoddess.com/archives/2009/12/16/swfobject-flash-doesnt-load-in-firefox/</link>
		<comments>http://www.scriptygoddess.com/archives/2009/12/16/swfobject-flash-doesnt-load-in-firefox/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 18:17:43 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Lessons learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1627</guid>
		<description><![CDATA[Ran into a bizarre problem today using swfobject. A lot of wasted time, but I&#039;ll give you the short story / solution. I&#039;m not sure of what other factors played a role (the fact that the element was in a absolute positioned container, or that the immediate container to the flash element was in a [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Ran into a bizarre problem today using <a href="http://code.google.com/p/swfobject/">swfobject</a>. A lot of wasted time, but I&#039;ll give you the short story / solution.</p>
<p>I&#039;m not sure of what other factors played a role (the fact that the element was in a absolute positioned container, or that the immediate container to the flash element was in a float) but I had the call to the swfobject javascript in the BODY tags of the html (not within the head tags). This was apparently causing Firefox to not display the flash. Simply moving the swfobject javascript code within the head tags of the html instantly fixed the problem.</p>
<p>I know I&#039;ve used swfobject inside the body before &#8211; so I&#039;m sure there&#039;s something else that contributed to the problem.</p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2009/12/16/swfobject-flash-doesnt-load-in-firefox/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Image as buttons (and IE issues)</title>
		<link>http://www.scriptygoddess.com/archives/2005/03/07/image-as-buttons-and-ie-issues/</link>
		<comments>http://www.scriptygoddess.com/archives/2005/03/07/image-as-buttons-and-ie-issues/#comments</comments>
		<pubDate>Mon, 07 Mar 2005 21:28:36 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[Lessons learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2005/03/07/image-as-buttons-and-ie-issues/</guid>
		<description><![CDATA[Oh, this one was going to drive me NUTS! I had to use images as buttons in a form. That&#039;s easy enough: &#60;input type="image" SRC="blahButton.gif" ALT="blah" name="blah" id="blah" value="blah" /&#62; Which works fine when simply submitting the form when there&#039;s ONE button. But on one page I had TWO buttons. The form would submit to [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Oh, this one was going to drive me NUTS! I had to use images as buttons in a form. That&#039;s easy enough:</p>
<p><code>&lt;input type="image" SRC="blahButton.gif" ALT="blah" name="blah" id="blah" value="blah" /&gt;</code></p>
<p>Which works fine when simply submitting the form when there&#039;s ONE button. But on one page I had TWO buttons. The form would submit to itself, and then depending on which button was clicked, I would handle the form as appropriate. Worked fine in firefox &#8211; nothing happened in IE. I found <a href="http://www.webmasterworld.com/forum21/9694.htm">this page in a search</a>.</p>
<p>What I had been doing was simply (in php)</p>
<p><code>if (isset($_POST["blah"])) {<br />
	//do stuff<br />
} else if (isset($_POST["blahblah"])) {<br />
	//do different stuff<br />
}</code></p>
<p>What fixed the problem was changing that code to this:</p>
<p><code>if (isset($_POST["blah_x"])) {<br />
	//do stuff<br />
} else if (isset($_POST["blahblah_x"])) {<br />
	//do different stuff<br />
}</code></p>
<p>Now my form works&#8230;</p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2005/03/07/image-as-buttons-and-ie-issues/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>ASP: Look up / translation script</title>
		<link>http://www.scriptygoddess.com/archives/2004/11/10/asp-look-up-translation-script/</link>
		<comments>http://www.scriptygoddess.com/archives/2004/11/10/asp-look-up-translation-script/#comments</comments>
		<pubDate>Wed, 10 Nov 2004 14:47:15 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[Bookmarks]]></category>
		<category><![CDATA[Lessons learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2004/11/10/asp-look-up-translation-script/</guid>
		<description><![CDATA[I should create a category called &#034;saved my ass&#034;! This script would fall under it. I was asked to create a &#034;look up&#034; tool that would sort of &#034;translate&#034; one piece of text to another. The user would enter in the first piece of text, and then they&#039;d be given the &#034;value&#034;. Oh, and this [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I should create a category called &#034;saved my ass&#034;! This script would fall under it.</p>
<p>I was asked to create a &#034;look up&#034; tool that would sort of &#034;translate&#034; one piece of text to another. The user would enter in the first piece of text, and then they&#039;d be given the &#034;value&#034;. Oh, and this list updates every few months or so.</p>
<p>At first I started looking into creating a database, and writing a script that would update that database &#8211; problem was that creating and accessing a database for this project was going to be time consuming and difficult. A server-side script would have been the best solution under the circumstances. A few hours this morning searching around turned up <a href="http://www.asptutorial.info/learn/Dictionary.asp">this &#034;dictionary&#034; script</a>.</p>
<p>I&#039;m actually being given the the text and values in excel, so I just need to create a sort of &#034;template&#034; in excel that formats everything so it will look like the code &#8211; and then I just copy and paste it all into the ASP file.</p>
<p>So here&#039;s kind of what I have in my file:<br />
<h3>SET TextToNumber=CreateObject(&#034;Scripting.Dictionary&#034;)<br />
TextToNumber.Add &#034;name&#034;, &#034;292949&#034;<br />
TextToNumber.Add &#034;date&#034;, &#034;123414&#034;<br />
etc. etc&#8230;</h3>
<p>Then my form looks like this:</p>
<h3>&lt;form name=&#034;textlookup&#034; action=&#034;lookup.asp&#034; method=&#034;post&#034;&gt;<br />
Text: &lt;input type=&#034;text&#034; name=&#034;text&#034; value=&#034;" /&gt;&lt;br&gt;<br />
&lt;input type=&#034;submit&#034; name=&#034;submit&#034; value=&#034;Look Up Text Number&#034; /&gt;&lt;/form&gt;<br />
Text: &lt;% Response.Write(Request.Form(&#034;text&#034;)) %&gt;&lt;br&gt;<br />
Number: &lt;%<br />
TextValue=Request.Form(&#034;text&#034;)<br />
NumberValue=TextToNumber(TextValue)<br />
Response.Write(NumberValue)<br />
%&gt;</h3>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2004/11/10/asp-look-up-translation-script/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>PHP: simple logic statement</title>
		<link>http://www.scriptygoddess.com/archives/2004/11/05/php-simple-logic-statement/</link>
		<comments>http://www.scriptygoddess.com/archives/2004/11/05/php-simple-logic-statement/#comments</comments>
		<pubDate>Sat, 06 Nov 2004 01:47:38 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[Lessons learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2004/11/05/php-simple-logic-statement/</guid>
		<description><![CDATA[I&#039;m tired of searching for the correct syntax everytime I wan to use this line&#8230; if you&#039;re doing a simple one line &#034;if&#034; statement, you can use a &#034;ternary conditional operator&#034; &#8211; for example: echo $variable == &#039;value&#039; ? &#039;print if true&#039; : &#039;print if false&#039;; No related posts. Related posts brought to you by [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I&#039;m tired of searching for the correct syntax everytime I wan to use this line&#8230; if you&#039;re doing a simple one line &#034;if&#034; statement, you can use a &#034;ternary conditional operator&#034; &#8211; for example:<br />
<h3>echo $variable == &#039;value&#039; ? &#039;print if true&#039; : &#039;print if false&#039;;</h3>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2004/11/05/php-simple-logic-statement/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Continue vs. Break (in while loops)</title>
		<link>http://www.scriptygoddess.com/archives/2004/10/25/continue-vs-break-in-while-loops/</link>
		<comments>http://www.scriptygoddess.com/archives/2004/10/25/continue-vs-break-in-while-loops/#comments</comments>
		<pubDate>Mon, 25 Oct 2004 17:15:13 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[Lessons learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2004/10/25/continue-vs-break-in-while-loops/</guid>
		<description><![CDATA[(note to self type post) Using &#034;continue&#034; in the middle of a while loop will skip the current iteration and go back to the beginning of the loop (checking the while value again). Using &#034;break&#034; in the middle of a while loop will break the loop entirely. (no more looping) So this code &#60;?php $i [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>(note to self type post)<br />
Using &#034;continue&#034; in the middle of a while loop will skip the current iteration and go back to the beginning of the loop (checking the while value again).</p>
<p>Using &#034;break&#034; in the middle of a while loop will break the loop entirely. (no more looping)</p>
<p>So this code<br />
<h3>&lt;?php<br />
$i = 0;<br />
while ($i &lt; 5) {<br />
$i++;<br />
	if ($i%2) {<br />
		echo &#034;value = &#034; .$i . &#034; &#8211; inside if&lt;br&gt;&#034;;<br />
		<strong>continue;</strong><br />
	}<br />
echo &#034;value = &#034; .$i . &#034; &#8211; outside if&lt;br&gt;&#034;;<br />
}<br />
?&gt;</h3>
<p>Will produce this:<br />
value = 1 &#8211; inside if<br />
value = 2 &#8211; outside if<br />
value = 3 &#8211; inside if<br />
value = 4 &#8211; outside if<br />
value = 5 &#8211; inside if</p>
<p>Where as this</p>
<h3>&lt;?php<br />
$i = 0;<br />
while ($i &lt; 5) {<br />
$i++;<br />
	if ($i%2) {<br />
		echo &#034;value = &#034; .$i . &#034; &#8211; inside if&lt;br&gt;&#034;;<br />
		<strong>break;</strong><br />
	}<br />
echo &#034;value = &#034; .$i . &#034; &#8211; outside if&lt;br&gt;&#034;;<br />
}<br />
?&gt;</h3>
<p>Will produce this:<br />
value = 1 &#8211; inside if</p>
<p><a href="http://us2.php.net/while">See more about while loops here.</a></p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2004/10/25/continue-vs-break-in-while-loops/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

