<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Recursos de programació</title>
	<atom:link href="http://programacio.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://programacio.wordpress.com</link>
	<description>by Yuanga</description>
	<lastBuildDate>Sat, 23 May 2009 18:42:31 +0000</lastBuildDate>
	<language>ca</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='programacio.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Recursos de programació</title>
		<link>http://programacio.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://programacio.wordpress.com/osd.xml" title="Recursos de programació" />
	<atom:link rel='hub' href='http://programacio.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Contar resultat del explode</title>
		<link>http://programacio.wordpress.com/2009/05/23/contar-resultat-del-explode/</link>
		<comments>http://programacio.wordpress.com/2009/05/23/contar-resultat-del-explode/#comments</comments>
		<pubDate>Sat, 23 May 2009 18:42:31 +0000</pubDate>
		<dc:creator>yuanga</dc:creator>
				<category><![CDATA[explode]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programació]]></category>

		<guid isPermaLink="false">http://programacio.wordpress.com/?p=41</guid>
		<description><![CDATA[Moltes vegades m&#8217;han vingut ganes de fer servir la funció explode() de php per dividir una frase, però m&#8217;ha tirat enrera el fet de no saber en quantes parts ho dividia. Ja he trobat la solució: Suposem que tinc un nom &#8220;Joan Garcia i Santiago&#8221; que vull dividir pels espais mitjançant explode(). Si afegeixo davant [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programacio.wordpress.com&amp;blog=982645&amp;post=41&amp;subd=programacio&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Moltes vegades m&#8217;han vingut ganes de fer servir la funció explode() de php per dividir una frase, però m&#8217;ha tirat enrera el fet de no saber en quantes parts ho dividia. Ja he trobat la solució:</p>
<p>Suposem que tinc un nom &#8220;Joan Garcia i Santiago&#8221; que vull dividir pels espais mitjançant explode(). Si afegeixo davant la funció sizeof() puc saber quants troços em crearà.</p>
<blockquote><p>$parts = sizeof(explode(&#8221; &#8220;, $nombre));<br />
$trozos = explode(&#8221; &#8220;, $nombre);</p>
<p>echo $parts; //em retornarà 4.</p>
<p>echo $trozos[0].&#8221; &#8220;.$trozos[1];  //em retornarà &#8220;Joan Garcia&#8221;.</p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programacio.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programacio.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programacio.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programacio.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/programacio.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/programacio.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/programacio.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/programacio.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programacio.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programacio.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programacio.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programacio.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programacio.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programacio.wordpress.com/41/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programacio.wordpress.com&amp;blog=982645&amp;post=41&amp;subd=programacio&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://programacio.wordpress.com/2009/05/23/contar-resultat-del-explode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62673b669aadaaf4991cb3633a12271f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">yuanga</media:title>
		</media:content>
	</item>
		<item>
		<title>IP del visitant</title>
		<link>http://programacio.wordpress.com/2008/07/02/ip-del-visitant/</link>
		<comments>http://programacio.wordpress.com/2008/07/02/ip-del-visitant/#comments</comments>
		<pubDate>Wed, 02 Jul 2008 14:02:51 +0000</pubDate>
		<dc:creator>yuanga</dc:creator>
				<category><![CDATA[formulari]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programació]]></category>

		<guid isPermaLink="false">http://programacio.wordpress.com/?p=37</guid>
		<description><![CDATA[Per obtenit la IP pública del visitant només hem d&#8217;afegir el següent codi php: &#60;? echo $_SERVER[REMOTE_ADDR] ?&#62;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programacio.wordpress.com&amp;blog=982645&amp;post=37&amp;subd=programacio&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Per obtenit la IP pública del visitant només hem d&#8217;afegir el següent codi php:</p>
<blockquote><p>&lt;? echo $_SERVER[REMOTE_ADDR] ?&gt;</p></blockquote>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/programacio.wordpress.com/37/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/programacio.wordpress.com/37/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programacio.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programacio.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programacio.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programacio.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/programacio.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/programacio.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/programacio.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/programacio.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programacio.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programacio.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programacio.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programacio.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programacio.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programacio.wordpress.com/37/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programacio.wordpress.com&amp;blog=982645&amp;post=37&amp;subd=programacio&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://programacio.wordpress.com/2008/07/02/ip-del-visitant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62673b669aadaaf4991cb3633a12271f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">yuanga</media:title>
		</media:content>
	</item>
		<item>
		<title>Llista amb icona personalitzada</title>
		<link>http://programacio.wordpress.com/2008/04/24/llista-amb-icona-personalitzada/</link>
		<comments>http://programacio.wordpress.com/2008/04/24/llista-amb-icona-personalitzada/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 08:38:35 +0000</pubDate>
		<dc:creator>yuanga</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[disseny]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[imatges]]></category>
		<category><![CDATA[li]]></category>
		<category><![CDATA[programació]]></category>

		<guid isPermaLink="false">http://programacio.wordpress.com/?p=36</guid>
		<description><![CDATA[Aquesta és una altra manera de posar una icona a una llista &#60;li&#62;. Al css posarem: .mac { font-size: 11px; padding-left: 17px; margin-bottom: 5px; background:url(images/macosx.gif) bottom left no-repeat; List-style:none; } I al document html: &#60;li class=&#8221;mac&#8221;&#62;Macintosh&#60;/li&#62;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programacio.wordpress.com&amp;blog=982645&amp;post=36&amp;subd=programacio&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Aquesta és una altra manera de posar una icona a una llista &lt;li&gt;. Al css posarem:</p>
<blockquote><p>.mac {<br />
font-size: 11px;<br />
padding-left: 17px;<br />
margin-bottom: 5px;<br />
background:url(images/macosx.gif) bottom left no-repeat;<br />
List-style:none;<br />
}</p></blockquote>
<p>I al document html:</p>
<blockquote><p>&lt;li class=&#8221;mac&#8221;&gt;Macintosh&lt;/li&gt;</p></blockquote>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/programacio.wordpress.com/36/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/programacio.wordpress.com/36/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programacio.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programacio.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programacio.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programacio.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/programacio.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/programacio.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/programacio.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/programacio.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programacio.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programacio.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programacio.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programacio.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programacio.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programacio.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programacio.wordpress.com&amp;blog=982645&amp;post=36&amp;subd=programacio&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://programacio.wordpress.com/2008/04/24/llista-amb-icona-personalitzada/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62673b669aadaaf4991cb3633a12271f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">yuanga</media:title>
		</media:content>
	</item>
		<item>
		<title>Ordenar array</title>
		<link>http://programacio.wordpress.com/2008/04/03/ordenar-array/</link>
		<comments>http://programacio.wordpress.com/2008/04/03/ordenar-array/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 20:11:32 +0000</pubDate>
		<dc:creator>yuanga</dc:creator>
				<category><![CDATA[array]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programació]]></category>

		<guid isPermaLink="false">http://programacio.wordpress.com/?p=35</guid>
		<description><![CDATA[Ordenem les dades d&#8217;un array mitjançant la funció de php sort(): &#60;? $alumnes = array(&#8220;Cristina&#8221;, &#8220;Joan&#8221;, &#8220;Marc&#8221;, &#8220;Albert&#8221;, &#8220;Carles&#8221;); sort($alumnes); foreach ($alumnes as $key =&#62; $val) { echo &#8220;alumnes[" . $key . "] = &#8221; . $val . &#8220;&#8220;; } ?&#62; Veure més informació.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programacio.wordpress.com&amp;blog=982645&amp;post=35&amp;subd=programacio&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ordenem les dades d&#8217;un array mitjançant la funció de php <strong>sort()</strong>:</p>
<p style="display:block;font-size:11px;overflow:scroll;line-height:18px;background-color:#f2f2f2;padding:15px;">&lt;?<br />
$alumnes = array(&#8220;Cristina&#8221;, &#8220;Joan&#8221;, &#8220;Marc&#8221;, &#8220;Albert&#8221;, &#8220;Carles&#8221;);<br />
sort($alumnes);<br />
foreach ($alumnes as $key =&gt; $val) {<br />
    echo &#8220;alumnes[" . $key . "] = &#8221; . $val . &#8220;<br />&#8220;;<br />
}<br />
?&gt;</p>
<p>Veure <a target="_blank" href="http://www.desarrolloweb.com/articulos/ordenar-arrays-php.html">més informació</a>.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/programacio.wordpress.com/35/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/programacio.wordpress.com/35/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programacio.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programacio.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programacio.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programacio.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/programacio.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/programacio.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/programacio.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/programacio.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programacio.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programacio.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programacio.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programacio.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programacio.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programacio.wordpress.com/35/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programacio.wordpress.com&amp;blog=982645&amp;post=35&amp;subd=programacio&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://programacio.wordpress.com/2008/04/03/ordenar-array/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62673b669aadaaf4991cb3633a12271f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">yuanga</media:title>
		</media:content>
	</item>
		<item>
		<title>Crear array</title>
		<link>http://programacio.wordpress.com/2008/04/03/crear-array/</link>
		<comments>http://programacio.wordpress.com/2008/04/03/crear-array/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 20:08:26 +0000</pubDate>
		<dc:creator>yuanga</dc:creator>
				<category><![CDATA[array]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programació]]></category>

		<guid isPermaLink="false">http://programacio.wordpress.com/?p=34</guid>
		<description><![CDATA[Podem crear un array de la següent manera: &#60;? $ciutats = array( 0=&#62;&#8221;lleida&#8221;, 1=&#62;&#8221;barcelona&#8221;, 2=&#62;&#8221;girona&#8221;); ?&#62; i fegir-ne més tard altres valors: &#60;? $ciutats[3] = &#8220;tarragona&#8221;; ?&#62;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programacio.wordpress.com&amp;blog=982645&amp;post=34&amp;subd=programacio&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Podem crear un <strong>array</strong> de la següent manera:</p>
<p style="display:block;font-size:11px;overflow:scroll;line-height:18px;background-color:#f2f2f2;padding:15px;">&lt;?<br />
$ciutats = array(<br />
0=&gt;&#8221;lleida&#8221;,<br />
1=&gt;&#8221;barcelona&#8221;,<br />
2=&gt;&#8221;girona&#8221;);<br />
?&gt;</p>
<p>i fegir-ne més tard altres valors:</p>
<p style="display:block;font-size:11px;overflow:scroll;line-height:18px;background-color:#f2f2f2;padding:15px;">&lt;?<br />
$ciutats[3] = &#8220;tarragona&#8221;;<br />
?&gt;</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/programacio.wordpress.com/34/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/programacio.wordpress.com/34/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programacio.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programacio.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programacio.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programacio.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/programacio.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/programacio.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/programacio.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/programacio.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programacio.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programacio.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programacio.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programacio.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programacio.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programacio.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programacio.wordpress.com&amp;blog=982645&amp;post=34&amp;subd=programacio&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://programacio.wordpress.com/2008/04/03/crear-array/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62673b669aadaaf4991cb3633a12271f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">yuanga</media:title>
		</media:content>
	</item>
		<item>
		<title>Canviar color d&#8217;una fila</title>
		<link>http://programacio.wordpress.com/2008/01/29/canviar-color-duna-fila/</link>
		<comments>http://programacio.wordpress.com/2008/01/29/canviar-color-duna-fila/#comments</comments>
		<pubDate>Tue, 29 Jan 2008 15:49:20 +0000</pubDate>
		<dc:creator>yuanga</dc:creator>
				<category><![CDATA[disseny]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[td]]></category>
		<category><![CDATA[tr]]></category>

		<guid isPermaLink="false">http://programacio.wordpress.com/?p=33</guid>
		<description><![CDATA[Per canviar el color d&#8217;una fila al passar el mouse per sobre, s&#8217;ha de posar el següent codi HTML: &#60;tr onmouseover=&#8221;this.bgColor=&#8217;#CFCDFE&#8217;&#8221; onmouseout=&#8221;this.bgColor=&#8217;#FFFFCC&#8217;&#8221;&#62; Es pot canviar &#60;tr&#62; per &#60;td&#62; si es vol fer el mateix només amb una cel·la.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programacio.wordpress.com&amp;blog=982645&amp;post=33&amp;subd=programacio&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Per canviar el color d&#8217;una fila al passar el <em>mouse</em> per sobre, s&#8217;ha de posar el següent codi HTML:</p>
<p style="display:block;font-size:11px;overflow:scroll;line-height:18px;background-color:#f2f2f2;padding:15px;">&lt;tr onmouseover=&#8221;this.bgColor=&#8217;#CFCDFE&#8217;&#8221; onmouseout=&#8221;this.bgColor=&#8217;#FFFFCC&#8217;&#8221;&gt;</p>
<p>Es pot canviar &lt;tr&gt; per &lt;td&gt; si es vol fer el mateix només amb una cel·la.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/programacio.wordpress.com/33/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/programacio.wordpress.com/33/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programacio.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programacio.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programacio.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programacio.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/programacio.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/programacio.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/programacio.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/programacio.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programacio.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programacio.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programacio.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programacio.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programacio.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programacio.wordpress.com/33/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programacio.wordpress.com&amp;blog=982645&amp;post=33&amp;subd=programacio&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://programacio.wordpress.com/2008/01/29/canviar-color-duna-fila/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62673b669aadaaf4991cb3633a12271f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">yuanga</media:title>
		</media:content>
	</item>
		<item>
		<title>Una variable de la pàgina actual</title>
		<link>http://programacio.wordpress.com/2007/08/26/una-variable-de-la-pagina-actual/</link>
		<comments>http://programacio.wordpress.com/2007/08/26/una-variable-de-la-pagina-actual/#comments</comments>
		<pubDate>Sun, 26 Aug 2007 11:31:10 +0000</pubDate>
		<dc:creator>yuanga</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[programació]]></category>

		<guid isPermaLink="false">http://programacio.wordpress.com/2007/08/26/una-variable-de-la-pagina-actual/</guid>
		<description><![CDATA[Suposem que estem treballant a la pàgina següent i volem rescatar el valor de la variable cont: prova.php?cont=123&#38;id=456&#38;ud=789 Primer de tot recuperem tota l&#8217;adreça, i per això emmagatzegarem a la variable $request_uri tota l&#8217;adreça. $request_uri = $_SERVER['REQUEST_URI']; El que farem serà tallar la variable $request_uri mitjançant la funció substr() per la zona que ens interessa, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programacio.wordpress.com&amp;blog=982645&amp;post=32&amp;subd=programacio&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Suposem que estem treballant a la pàgina següent i volem rescatar el valor de la variable <strong>cont</strong>:</p>
<p style="display:block;font-size:11px;overflow:scroll;line-height:18px;background-color:#f2f2f2;padding:15px;">prova.php?<strong>cont=123</strong>&amp;id=456&amp;ud=789</p>
<p>Primer de tot recuperem tota l&#8217;adreça, i per això emmagatzegarem a la variable <em>$request_uri</em> tota l&#8217;adreça.</p>
<p style="display:block;font-size:11px;overflow:scroll;line-height:18px;background-color:#f2f2f2;padding:15px;">$request_uri = $_SERVER['REQUEST_URI'];</p>
<p>El que farem serà tallar la variable <em>$request_uri</em> mitjançant la funció <em>substr()</em> per la zona que ens interessa, i per això haurem d&#8217;esbrinar on comença i on acaba. Per conèixer tots dos punts farem servir la funció <em>strpos()</em>:</p>
<p style="display:block;font-size:11px;overflow:scroll;line-height:18px;background-color:#f2f2f2;padding:15px;">$cont = strpos($request_uri,&#8221;cont&#8221;) + 5;<br />
$ampersand = strpos($request_uri,&#8221;&amp;&#8221;);<br />
$llargada = $ampersand &#8211; $cont;</p>
<p><strong>$cont</strong> ens permet esbrinar on comença la variable <strong>cont</strong>. Posem el <em>+5</em> per no agafar també el troç &#8220;<em>cont=</em>&#8221; de la cadena.<br />
<strong>$ampersand</strong> ens dona la posició on comença la següent variable.<br />
<strong>$llargada</strong> ens diu, doncs, el troç que hem de tallar de la cadena.<br />
Finalment aconseguim el valor de la cadena <strong>cont </strong>amb la funció <em>substr()</em>:</p>
<p style="display:block;font-size:11px;overflow:scroll;line-height:18px;background-color:#f2f2f2;padding:15px;">$Contingut = substr($request_uri, $cont, $llargada);<br />
echo $Contingut;</p>
<p><span id="more-32"></span><br />
Tot el codi:</p>
<p style="display:block;font-size:11px;overflow:scroll;line-height:18px;background-color:#f2f2f2;padding:15px;">&lt;?<br />
$request_uri = $_SERVER['REQUEST_URI'];<br />
$cont = strpos($request_uri,&#8221;cont&#8221;) + 5;<br />
$ampersand = strpos($request_uri,&#8221;&amp;&#8221;);<br />
$llargada = $ampersand &#8211; $cont;<br />
$Contingut = substr($request_uri, $cont, $llargada);<br />
echo $Contingut;<br />
?&gt;</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/programacio.wordpress.com/32/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/programacio.wordpress.com/32/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programacio.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programacio.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programacio.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programacio.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/programacio.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/programacio.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/programacio.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/programacio.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programacio.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programacio.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programacio.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programacio.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programacio.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programacio.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programacio.wordpress.com&amp;blog=982645&amp;post=32&amp;subd=programacio&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://programacio.wordpress.com/2007/08/26/una-variable-de-la-pagina-actual/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62673b669aadaaf4991cb3633a12271f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">yuanga</media:title>
		</media:content>
	</item>
		<item>
		<title>Pàgina actual amb variables</title>
		<link>http://programacio.wordpress.com/2007/08/26/pagina-actual-amb-variables/</link>
		<comments>http://programacio.wordpress.com/2007/08/26/pagina-actual-amb-variables/#comments</comments>
		<pubDate>Sun, 26 Aug 2007 11:13:21 +0000</pubDate>
		<dc:creator>yuanga</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[programació]]></category>

		<guid isPermaLink="false">http://programacio.wordpress.com/2007/08/26/pagina-actual-amb-variables/</guid>
		<description><![CDATA[Per saber la pàgina actual en la que s&#8217;executa el codi, incloses les variables, s&#8217;ha de posar: &#60;? echo $_SERVER['REQUEST_URI']; ?&#62; I ens tornaría una cosa semblant a aquesta: prova.php?cont=123&#38;id=456&#38;ud=789<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programacio.wordpress.com&amp;blog=982645&amp;post=31&amp;subd=programacio&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Per saber la pàgina actual en la que s&#8217;executa el codi, incloses les variables, s&#8217;ha de posar:</p>
<p style="display:block;font-size:11px;overflow:scroll;line-height:18px;background-color:#f2f2f2;padding:15px;">
&lt;?<br />
echo $_SERVER['REQUEST_URI'];<br />
?&gt;
</p>
<p>I ens tornaría una cosa semblant a aquesta:</p>
<p style="display:block;font-size:11px;overflow:scroll;line-height:18px;background-color:#f2f2f2;padding:15px;">
prova.php?cont=123&amp;id=456&amp;ud=789</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/programacio.wordpress.com/31/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/programacio.wordpress.com/31/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programacio.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programacio.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programacio.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programacio.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/programacio.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/programacio.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/programacio.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/programacio.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programacio.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programacio.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programacio.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programacio.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programacio.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programacio.wordpress.com/31/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programacio.wordpress.com&amp;blog=982645&amp;post=31&amp;subd=programacio&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://programacio.wordpress.com/2007/08/26/pagina-actual-amb-variables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62673b669aadaaf4991cb3633a12271f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">yuanga</media:title>
		</media:content>
	</item>
		<item>
		<title>Contar el nombre de files</title>
		<link>http://programacio.wordpress.com/2007/08/19/contar-el-nombre-de-files/</link>
		<comments>http://programacio.wordpress.com/2007/08/19/contar-el-nombre-de-files/#comments</comments>
		<pubDate>Sun, 19 Aug 2007 11:00:49 +0000</pubDate>
		<dc:creator>yuanga</dc:creator>
				<category><![CDATA[bbdd]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programació]]></category>

		<guid isPermaLink="false">http://programacio.wordpress.com/2007/08/19/contar-el-nombre-de-files/</guid>
		<description><![CDATA[Per contar el nombre de files d&#8217;una consulta mysql, fent servir php: &#60;? $result = mysql_query(&#8220;SELECT * FROM tabla&#8221;, $db); $filas = mysql_num_rows($result); ?&#62;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programacio.wordpress.com&amp;blog=982645&amp;post=30&amp;subd=programacio&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Per contar el nombre de files d&#8217;una consulta <em>mysql</em>, fent servir <em>php</em>:</p>
<p style="display:block;font-size:11px;overflow:scroll;line-height:18px;background-color:#f2f2f2;padding:15px;">&lt;?<br />
$result = mysql_query(&#8220;SELECT * FROM tabla&#8221;, $db);<br />
$filas = <strong>mysql_num_rows(</strong>$result<strong>)</strong>;<br />
?&gt;</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/programacio.wordpress.com/30/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/programacio.wordpress.com/30/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programacio.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programacio.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programacio.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programacio.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/programacio.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/programacio.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/programacio.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/programacio.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programacio.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programacio.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programacio.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programacio.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programacio.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programacio.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programacio.wordpress.com&amp;blog=982645&amp;post=30&amp;subd=programacio&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://programacio.wordpress.com/2007/08/19/contar-el-nombre-de-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62673b669aadaaf4991cb3633a12271f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">yuanga</media:title>
		</media:content>
	</item>
		<item>
		<title>Insertar arxiu css</title>
		<link>http://programacio.wordpress.com/2007/08/12/insertar-arxiu-css/</link>
		<comments>http://programacio.wordpress.com/2007/08/12/insertar-arxiu-css/#comments</comments>
		<pubDate>Sun, 12 Aug 2007 20:09:28 +0000</pubDate>
		<dc:creator>yuanga</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[programació]]></category>

		<guid isPermaLink="false">http://programacio.wordpress.com/2007/08/12/insertar-arxiu-css/</guid>
		<description><![CDATA[Per insertar un css s&#8217;ha d&#8217;escriure això al &#60;head&#62;: &#60;link rel=&#8221;StyleSheet&#8221; href=&#8221;estils.css&#8221; type=&#8221;text/css&#62;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programacio.wordpress.com&amp;blog=982645&amp;post=29&amp;subd=programacio&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Per insertar un <strong>css</strong> s&#8217;ha d&#8217;escriure això al &lt;<em>head</em>&gt;:</p>
<p style="display:block;font-size:11px;overflow:scroll;line-height:18px;background-color:#f2f2f2;padding:15px;">&lt;link rel=&#8221;StyleSheet&#8221; href=&#8221;estils.css&#8221; type=&#8221;text/css&gt;</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/programacio.wordpress.com/29/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/programacio.wordpress.com/29/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programacio.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programacio.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programacio.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programacio.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/programacio.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/programacio.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/programacio.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/programacio.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programacio.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programacio.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programacio.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programacio.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programacio.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programacio.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programacio.wordpress.com&amp;blog=982645&amp;post=29&amp;subd=programacio&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://programacio.wordpress.com/2007/08/12/insertar-arxiu-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62673b669aadaaf4991cb3633a12271f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">yuanga</media:title>
		</media:content>
	</item>
	</channel>
</rss>
