<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[contatore esadecimale]]></title><description><![CDATA[<p dir="auto">salve a tutti,</p>
<p dir="auto">questo codice php:</p>
<pre><code class="language-php">&lt;?php	
	for ($i = 0; $i &lt;= 100; $i++){		//167772016			$h = dechex($i);		//printf('%06d', $h);		echo $h;		echo "&lt;/br&gt;";	}
?&gt;
</code></pre>
<p dir="auto">è un contatore esadecimale; da una sequenza di numeri di questo tipo:</p>
<p dir="auto">0<br />
1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
9<br />
a<br />
b<br />
c<br />
d<br />
e</p>
<p dir="auto">vorrei aggiungere degli zeri in modo che si formattato così:</p>
<p dir="auto">000000<br />
000001<br />
000002<br />
...</p>
<p dir="auto">con il printf funziona ma non per le lettere.</p>
<p dir="auto">avete qualche idea?</p>
<p dir="auto">grazie mille a tutti e buona giornata</p>
]]></description><link>https://dev.connect.gt/topic/217912/contatore-esadecimale</link><generator>RSS for Node</generator><lastBuildDate>Thu, 26 Nov 2026 21:05:40 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/217912.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 06 Oct 2015 12:24:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to contatore esadecimale on Tue, 06 Oct 2015 12:44:52 GMT]]></title><description><![CDATA[<p dir="auto">forse ho risolto,</p>
<p dir="auto">se a qualcuno dovesse servire:</p>
<pre><code class="language-php">&lt;?php    
    for ($i = 0; $i &lt;= 100; $i++){
    //167772016
    //$h = dechex($i);
    //printf('%06d', $h);
    $hz = sprintf("%06x", $i);
    echo $hz;
    echo "&lt;/br&gt;";
}
?&gt;
</code></pre>
]]></description><link>https://dev.connect.gt/post/1208867</link><guid isPermaLink="true">https://dev.connect.gt/post/1208867</guid><dc:creator><![CDATA[enricocarli]]></dc:creator><pubDate>Tue, 06 Oct 2015 12:44:52 GMT</pubDate></item></channel></rss>