<?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>Naeh.net &#187; utilisation</title>
	<atom:link href="http://naeh.net/tag/utilisation/feed/" rel="self" type="application/rss+xml" />
	<link>http://naeh.net</link>
	<description>Le mémo du développeur</description>
	<lastBuildDate>Wed, 30 Jun 2010 18:56:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Quelques astuces pour l&#8217;utilisation de tous les jours</title>
		<link>http://naeh.net/quelques-astuces-pour-lutilisation-de-tous-les-jours/</link>
		<comments>http://naeh.net/quelques-astuces-pour-lutilisation-de-tous-les-jours/#comments</comments>
		<pubDate>Thu, 04 Jan 2007 21:46:48 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[PHP / MySQL]]></category>
		<category><![CDATA[astuce]]></category>
		<category><![CDATA[développement]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Programmation]]></category>
		<category><![CDATA[tuto]]></category>
		<category><![CDATA[utilisation]]></category>

		<guid isPermaLink="false">http://wp.naeh.info/?p=15</guid>
		<description><![CDATA[Ici nous allons voir quelques astuces pratiques que tout programmeur voudrait utiliser dans ses applications, des astuces simples, mais bien sur qui peuvent être évoluées en fonction des besoins.
Afficher une date Mysql en format Français :
Les date dans mysql sont dans un format US (exemple : 2007-01-13 22:09:42) nous allons voir comment transformer ceci en [...]]]></description>
			<content:encoded><![CDATA[<p>Ici nous allons voir quelques astuces pratiques que tout programmeur voudrait utiliser dans ses applications, des astuces simples, mais bien sur qui peuvent être évoluées en fonction des besoins.</p>
<p><strong>Afficher une date Mysql en format Français :</strong></p>
<p>Les date dans mysql sont dans un format US (exemple : <strong>2007-01-13 22:09:42</strong>) nous allons voir comment transformer ceci en : <strong>13/01/2007 à 22:09:42</strong></p>
<p><em>$date_mysql est au format DATETIME dans mysql.</em></p>

<div class="wp_codebox"><table><tr id="p155"><td class="code" id="p15code5"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$date_fr</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;d/m/Y à H:i:s&quot;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/strtotime"><span style="color: #990000;">strtotime</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$date_mysql</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span></pre></td></tr></table></div>

<p><em>$date_fr correspond à ce que nous voulons afficher.</em></p>
<p>Pour plus d'informations voir <a href="http://fr.php.net/manual/fr/function.date.php" target="_blank">http://fr.php.net/manual/fr/function.date.php</a></p>
<p><strong>Jouer avec les majuscules / minuscules :</strong></p>
<p>Nous allons voir comment rendre plus joli l'affichage de nos textes, pratique pour les titres par exemple, mais chacun trouvera une utilisation personnalisée =)</p>
<p>Afficher la première lettre d'un mot en majuscule :</p>

<div class="wp_codebox"><table><tr id="p156"><td class="code" id="p15code6"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <a href="http://www.php.net/ucfirst"><span style="color: #990000;">ucfirst</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;bonjour tout le monde&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>     <span style="color: #666666; font-style: italic;">// affichera : Bonjour tout le monde</span></pre></td></tr></table></div>

<p>Afficher les premières lettres de tous les mots en majuscule:</p>

<div class="wp_codebox"><table><tr id="p157"><td class="code" id="p15code7"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <a href="http://www.php.net/ucwords"><span style="color: #990000;">ucwords</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;bonjour tout le monde&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>     <span style="color: #666666; font-style: italic;">// affichera : Bonjour Tout Le Monde</span></pre></td></tr></table></div>

<p>Afficher tout en majuscule / minuscule :</p>

<div class="wp_codebox"><table><tr id="p158"><td class="code" id="p15code8"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <a href="http://www.php.net/strtoupper"><span style="color: #990000;">strtoupper</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;bonjour tout le monde&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>     <span style="color: #666666; font-style: italic;">// affichera : BONJOUR TOUT LE MONDE</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <a href="http://www.php.net/strtolower"><span style="color: #990000;">strtolower</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;BONjour Tout le mONde&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>     <span style="color: #666666; font-style: italic;">// affichera : bonjour tout le monde</span></pre></td></tr></table></div>

<p>Pour plus d'informations voir : <a href="http://fr.php.net/manual/fr/function.strtolower.php" target="_blank">http://fr.php.net/manual/fr/function.strtolower.php</a> (voir également les autres fonctions)</p>
]]></content:encoded>
			<wfw:commentRss>http://naeh.net/quelques-astuces-pour-lutilisation-de-tous-les-jours/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
