<?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>Byumut &#187; php fonksiyon</title>
	<atom:link href="http://www.byumut.com/tag/php-fonksiyon/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.byumut.com</link>
	<description>&#34; Sadece Yapamadıklarınızdan Pişman Olursunuz &#34;</description>
	<lastBuildDate>Sun, 04 Jul 2010 11:17:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Php ile Çalıştığınız Sayfanın URL adresini almak</title>
		<link>http://www.byumut.com/php-ile-calistiginiz-sayfanin-url-adresini-almak/</link>
		<comments>http://www.byumut.com/php-ile-calistiginiz-sayfanin-url-adresini-almak/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 00:38:50 +0000</pubDate>
		<dc:creator>byumut</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[çalıştığınız sayfanın url adresi]]></category>
		<category><![CDATA[fonksiyon]]></category>
		<category><![CDATA[page url]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php fonksiyon]]></category>
		<category><![CDATA[php ile url adresi almak]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[url adres]]></category>
		<category><![CDATA[URL adresi almak]]></category>

		<guid isPermaLink="false">http://www.byumut.com/?p=535</guid>
		<description><![CDATA[Çok fazla ihtiyaç duymasakta bazen çalıştığımız sayfanın url adresini almamız gerekebilir . İşte bu gibi durumlarda yardımımıza koşacak basit ve etkili bir fonksiyonu sizlerle paylaşmak istiyorum . Fonksiyonu http veya https protokollerinide dikkate alarak işliyor . Bu yönden beğendiğim bir fonksiyon olup istenildiği gibi geliştirilmesi artık sizlere kalmıştır . Tepe tepe kullanın PLAIN TEXT PHP: [...]]]></description>
			<content:encoded><![CDATA[<p>Çok fazla ihtiyaç duymasakta bazen çalıştığımız sayfanın url adresini almamız gerekebilir . İşte bu gibi durumlarda yardımımıza koşacak basit ve etkili bir fonksiyonu sizlerle paylaşmak istiyorum . Fonksiyonu http veya https protokollerinide dikkate alarak işliyor . Bu yönden beğendiğim bir fonksiyon olup istenildiği gibi geliştirilmesi artık sizlere kalmıştır . Tepe tepe kullanın <img src='http://www.byumut.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<div class="igBar"><span id="lphp-2"><a href="#" onclick="javascript:showPlainTxt('php-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-2">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> PageURL<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$pageURL</span> = <span style="color:#FF0000;">'http'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$_SERVER</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"HTTPS"</span><span style="color:#006600; font-weight:bold;">&#93;</span> == <span style="color:#FF0000;">"on"</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#0000FF;">$pageURL</span> .= <span style="color:#FF0000;">"s"</span>;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<span style="color:#0000FF;">$pageURL</span> .= <span style="color:#FF0000;">"://"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$_SERVER</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"SERVER_PORT"</span><span style="color:#006600; font-weight:bold;">&#93;</span> != <span style="color:#FF0000;">"80"</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#0000FF;">$pageURL</span> .= <span style="color:#0000FF;">$_SERVER</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"SERVER_NAME"</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#FF0000;">":"</span>.<span style="color:#0000FF;">$_SERVER</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"SERVER_PORT"</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#0000FF;">$_SERVER</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"REQUEST_URI"</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#616100;">else</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#0000FF;">$pageURL</span> .= <span style="color:#0000FF;">$_SERVER</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"SERVER_NAME"</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#0000FF;">$_SERVER</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"REQUEST_URI"</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<span style="color:#616100;">return</span> <span style="color:#0000FF;">$pageURL</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.byumut.com/php-ile-calistiginiz-sayfanin-url-adresini-almak/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Translate Fonksiyonu</title>
		<link>http://www.byumut.com/google-translate-fonksiyonu/</link>
		<comments>http://www.byumut.com/google-translate-fonksiyonu/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 00:50:21 +0000</pubDate>
		<dc:creator>byumut</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[dil çeviri]]></category>
		<category><![CDATA[fonksiyon]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[google translate]]></category>
		<category><![CDATA[php çeviri]]></category>
		<category><![CDATA[php dil çeviri]]></category>
		<category><![CDATA[php fonksiyon]]></category>
		<category><![CDATA[php languages translate]]></category>
		<category><![CDATA[translate]]></category>

		<guid isPermaLink="false">http://www.byumut.com/?p=515</guid>
		<description><![CDATA[Hepimiz biliyoruzdur herhalde arkadaşlar Google 'nin http://translate.google.com adresinde bize sunduğu çeviri hizmetini . İşte bu hizmeti basit bir fonksiyon ile bizde sitelelerimizde rahatlıkla kullannabiliriz. İşte fonksiyon : PLAIN TEXT PHP: function Translate&#40;$str, $lang1="en", $lang2="tr"&#41;&#123; $data = file_get_contents&#40;'http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&#38;q='.urlencode&#40;$str&#41;.'&#38;langpair='.$lang1.'%7C'.$lang2.''&#41;; &#160; &#160; $data = json_decode&#40;$data&#41;; &#160; &#160; return $data-&#62;responseData-&#62;translatedText; &#125; Umarım işinize yarar]]></description>
			<content:encoded><![CDATA[<p>Hepimiz biliyoruzdur herhalde arkadaşlar Google 'nin <a href="http://translate.google.com">http://translate.google.com</a> adresinde bize sunduğu çeviri hizmetini . İşte bu hizmeti basit bir fonksiyon ile bizde sitelelerimizde rahatlıkla kullannabiliriz. </p>
<p><strong>İşte fonksiyon : </strong> </p>
<div class="igBar"><span id="lphp-4"><a href="#" onclick="javascript:showPlainTxt('php-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-4">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> Translate<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$str</span>, <span style="color:#0000FF;">$lang1</span>=<span style="color:#FF0000;">"en"</span>, <span style="color:#0000FF;">$lang2</span>=<span style="color:#FF0000;">"tr"</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$data</span> = <a href="http://www.php.net/file_get_contents"><span style="color:#000066;">file_get_contents</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&amp;q='</span>.<a href="http://www.php.net/urlencode"><span style="color:#000066;">urlencode</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$str</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#FF0000;">'&amp;langpair='</span>.<span style="color:#0000FF;">$lang1</span>.<span style="color:#FF0000;">'%7C'</span>.<span style="color:#0000FF;">$lang2</span>.<span style="color:#FF0000;">''</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$data</span> = json_decode<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$data</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">return</span> <span style="color:#0000FF;">$data</span>-&gt;<span style="color:#006600;">responseData</span>-&gt;<span style="color:#006600;">translatedText</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Umarım işinize yarar <img src='http://www.byumut.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.byumut.com/google-translate-fonksiyonu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Dizin İçindeki Klasör Veya Dosya Sayısını Bulma</title>
		<link>http://www.byumut.com/dizin-icindeki-klasor-ve-dosya-sayilari/</link>
		<comments>http://www.byumut.com/dizin-icindeki-klasor-ve-dosya-sayilari/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 08:25:25 +0000</pubDate>
		<dc:creator>byumut</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[dizindeki dosya sayma]]></category>
		<category><![CDATA[dosya say]]></category>
		<category><![CDATA[klasör sayma]]></category>
		<category><![CDATA[php fonksiyon]]></category>

		<guid isPermaLink="false">http://www.byumut.com/?p=381</guid>
		<description><![CDATA[Bir proje için geliştirmiş olduğum bir örnek fonksiyonun işlevi belirlediğimiz dizin içindeki " klasör " veya " dosya " sayısını bulmamıza yarıyor . Örnekler aşağıda olup hem klasör sayısını bulmak hemde dosya sayısını ayrı ayrı gösterdim . Hem klasör hemde dosya sayısını bulmamıza yarayan fonksiyon : PLAIN TEXT PHP: &#60;?php $klasor = "SAYILACAK_DİZİN"; function say&#40;$klasor&#41; [...]]]></description>
			<content:encoded><![CDATA[<p>Bir proje için geliştirmiş olduğum bir örnek fonksiyonun işlevi belirlediğimiz dizin içindeki " klasör " veya " dosya " sayısını bulmamıza yarıyor . Örnekler aşağıda olup hem klasör sayısını bulmak hemde dosya sayısını ayrı ayrı gösterdim .<br />
<span id="more-381"></span></p>
<p><strong>Hem klasör hemde dosya sayısını bulmamıza yarayan fonksiyon : </strong></p>
<div class="igBar"><span id="lphp-8"><a href="#" onclick="javascript:showPlainTxt('php-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-8">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$klasor</span> = <span style="color:#FF0000;">"SAYILACAK_DİZİN"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> say<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$klasor</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$dizi</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#FF9933; font-style:italic;">// dizi oluştur</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$open</span> = <a href="http://www.php.net/opendir"><span style="color:#000066;">opendir</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$klasor</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#FF9933; font-style:italic;">// klasör aç</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">while</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$q</span>=<a href="http://www.php.net/readdir"><span style="color:#000066;">readdir</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$open</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$q</span> != <span style="color:#FF0000;">"."</span> &amp;&amp; <span style="color:#0000FF;">$q</span> != <span style="color:#FF0000;">".."</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$dizi</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#0000FF;">$q</span>;&nbsp; &nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$sayi</span> = <a href="http://www.php.net/count"><span style="color:#000066;">count</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dizi</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#FF9933; font-style:italic;">// dosya sayısını bu söylüyor</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/closedir"><span style="color:#000066;">closedir</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$open</span><span style="color:#006600; font-weight:bold;">&#41;</span>;&nbsp; <span style="color:#FF9933; font-style:italic;">// klasörü kapatıyor</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">return</span> <span style="color:#0000FF;">$sayi</span>; <span style="color:#FF9933; font-style:italic;">// sayıyı çıktı olarak alıyor</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"$klasor dizinindeki klasör ve dosya sayısı toplam&nbsp; : "</span>.say<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$klasor</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><strong>Sadece klasörleri sayan fonksiyon : </strong></p>
<div class="igBar"><span id="lphp-9"><a href="#" onclick="javascript:showPlainTxt('php-9'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-9">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$klasor</span> = <span style="color:#FF0000;">"SAYILACAK_DİZİN"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> say<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$klasor</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$dizi</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#FF9933; font-style:italic;">// dizi oluştur</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$open</span> = <a href="http://www.php.net/opendir"><span style="color:#000066;">opendir</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$klasor</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#FF9933; font-style:italic;">// klasör aç</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">while</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$q</span>=<a href="http://www.php.net/readdir"><span style="color:#000066;">readdir</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$open</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$q</span> != <span style="color:#FF0000;">"."</span> &amp;&amp; <span style="color:#0000FF;">$q</span> != <span style="color:#FF0000;">".."</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/is_dir"><span style="color:#000066;">is_dir</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"$klasor/$q"</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#FF9933; font-style:italic;">// Burası klasörleri ayırt etmemize yardımcı oldu ... </span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$dizi</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#0000FF;">$q</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$sayi</span> = <a href="http://www.php.net/count"><span style="color:#000066;">count</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dizi</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#FF9933; font-style:italic;">// dosya sayısını bu söylüyor</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/closedir"><span style="color:#000066;">closedir</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$open</span><span style="color:#006600; font-weight:bold;">&#41;</span>;&nbsp; <span style="color:#FF9933; font-style:italic;">// klasörü kapatıyor</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">return</span> <span style="color:#0000FF;">$sayi</span>; <span style="color:#FF9933; font-style:italic;">// sayıyı çıktı olarak alıyor</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"$klasor dizinindeki sadece klasör sayısı "</span>.say<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$klasor</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><strong>Sadece dosyaları sayan fonksiyon : </strong></p>
<div class="igBar"><span id="lphp-10"><a href="#" onclick="javascript:showPlainTxt('php-10'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-10">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$klasor</span> = <span style="color:#FF0000;">"SAYILACAK_DİZİN"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> say<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$klasor</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$dizi</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#FF9933; font-style:italic;">// dizi oluştur</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$open</span> = <a href="http://www.php.net/opendir"><span style="color:#000066;">opendir</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$klasor</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#FF9933; font-style:italic;">// klasör aç</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">while</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$q</span>=<a href="http://www.php.net/readdir"><span style="color:#000066;">readdir</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$open</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$q</span> != <span style="color:#FF0000;">"."</span> &amp;&amp; <span style="color:#0000FF;">$q</span> != <span style="color:#FF0000;">".."</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/is_file"><span style="color:#000066;">is_file</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"$klasor/$q"</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#FF9933; font-style:italic;">// Burası dosyaları ayırt etmemize yardımcı oldu ... </span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$dizi</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#0000FF;">$q</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$sayi</span> = <a href="http://www.php.net/count"><span style="color:#000066;">count</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dizi</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#FF9933; font-style:italic;">// dosya sayısını bu söylüyor</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/closedir"><span style="color:#000066;">closedir</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$open</span><span style="color:#006600; font-weight:bold;">&#41;</span>;&nbsp; <span style="color:#FF9933; font-style:italic;">// klasörü kapatıyor</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">return</span> <span style="color:#0000FF;">$sayi</span>; <span style="color:#FF9933; font-style:italic;">// sayıyı çıktı olarak alıyor</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"$klasor dizinindeki sadece dosya sayısı "</span>.say<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$klasor</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.byumut.com/dizin-icindeki-klasor-ve-dosya-sayilari/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fonksiyon Kütüphanesi &#8211; Cookie , Setcookie</title>
		<link>http://www.byumut.com/fonksiyon-kutuphanesi-cookie-setcookie/</link>
		<comments>http://www.byumut.com/fonksiyon-kutuphanesi-cookie-setcookie/#comments</comments>
		<pubDate>Sun, 25 Jan 2009 22:54:59 +0000</pubDate>
		<dc:creator>byumut</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[cookie]]></category>
		<category><![CDATA[cookie subdomain sorunu]]></category>
		<category><![CDATA[fonksiyon]]></category>
		<category><![CDATA[fonksiyon kütüphanesi]]></category>
		<category><![CDATA[php fonksiyon]]></category>
		<category><![CDATA[setcookie]]></category>

		<guid isPermaLink="false">http://www.byumut.com/?p=372</guid>
		<description><![CDATA[Cookie'nin ingilizceden türkçeye çevrilmiş anlamı olarak çerez kullanılır ve internet sitelerinde kullanıcının bir sürelik bilgilerini veya isteğimize göre bazı kullanıcıya ait detayları tutmamıza yarayan bir fonksiyondur. Cookie oluşturma , silme işlemi : PLAIN TEXT PHP: # Cookie Oluşturuyoruz $cookie_degeri = 1; setcookie&#40;"Cookie_adi", $cookie_degeri, time&#40;&#41;+3600&#41;;&#160; /* 1 saatliğine geçerli */ echo $_COOKIE&#91;'Cookie_adi'&#93;; // Ekran Çıktısı : [...]]]></description>
			<content:encoded><![CDATA[<p>Cookie'nin ingilizceden türkçeye çevrilmiş anlamı olarak çerez kullanılır ve internet sitelerinde kullanıcının bir sürelik bilgilerini veya isteğimize göre bazı kullanıcıya ait detayları tutmamıza yarayan bir fonksiyondur. </p>
<p><span id="more-372"></span></p>
<p><strong>Cookie oluşturma , silme işlemi :</strong> </p>
<div class="igBar"><span id="lphp-16"><a href="#" onclick="javascript:showPlainTxt('php-16'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-16">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000; font-style:italic;"># Cookie Oluşturuyoruz </span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$cookie_degeri</span> = <span style="color:#CC66CC;color:#800000;">1</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/setcookie"><span style="color:#000066;">setcookie</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"Cookie_adi"</span>, <span style="color:#0000FF;">$cookie_degeri</span>, <a href="http://www.php.net/time"><span style="color:#000066;">time</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>+<span style="color:#CC66CC;color:#800000;">3600</span><span style="color:#006600; font-weight:bold;">&#41;</span>;&nbsp; <span style="color:#008000;">/* 1 saatliğine geçerli */</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#0000FF;">$_COOKIE</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'Cookie_adi'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Ekran Çıktısı : 1 olur . </span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Başka bir şekilde ekrana basmak istersek </span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#0000FF;">$HTTP_COOKIE_VARS</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"Cookie_adi"</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000; font-style:italic;"># Veya sadece o browser penceresi için geçerli cookie oluşturma </span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/setcookie"><span style="color:#000066;">setcookie</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"Cookie_adi"</span>, <span style="color:#0000FF;">$cookie_degeri</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><strong>Bu önceki oluşturduğumuz cookieyi silmek istersek : </strong></p>
<div class="igBar"><span id="lphp-17"><a href="#" onclick="javascript:showPlainTxt('php-17'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-17">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000; font-style:italic;"># Cookie siliyoruz </span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/setcookie"><span style="color:#000066;">setcookie</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"Cookie_adi"</span>, <span style="color:#FF0000;">""</span> , <a href="http://www.php.net/time"><span style="color:#000066;">time</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>-<span style="color:#CC66CC;color:#800000;">3600</span><span style="color:#006600; font-weight:bold;">&#41;</span>;&nbsp; <span style="color:#008000;">/* 1 saatliğine oluşturduğumuz için tekrar 1 saat çıkarıyoruz ( 3600 saniye ) */</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000; font-style:italic;"># Veya </span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/setcookie"><span style="color:#000066;">setcookie</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"Cookie_adi"</span>, <span style="color:#FF0000;">""</span> , <a href="http://www.php.net/time"><span style="color:#000066;">time</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>-<span style="color:#CC66CC;color:#800000;">99999999999999</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#008000;">/* Süre belirtmeden cookieleri kaldırabiliriz .&nbsp; */</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000; font-style:italic;"># Yada süresiz o browser penceresi için oluşturduğumuz cookileri silme&nbsp; </span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/setcookie"><span style="color:#000066;">setcookie</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"Cookie_adi"</span>, <span style="color:#FF0000;">""</span> <span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Ve gelelim en büyük sorunlardan birisine bu sorun ise subdomain ( Alt alan adı ) kullanılan sitelerde cookieleri gösterme sorunu . Bu sorunu halledebilmemiz için çok önemli ve tekbir olay var oda setcookie fonksiyonumuzdan sonra kullanacağımız kısa bir domain adı belirtmemiz .</p>
<p><strong>Şu şekilde : </strong></p>
<div class="igBar"><span id="lphp-18"><a href="#" onclick="javascript:showPlainTxt('php-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-18">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$cookie_degeri</span> = <span style="color:#CC66CC;color:#800000;">1</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/setcookie"><span style="color:#000066;">setcookie</span></a> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"Cookie_adi"</span>, <span style="color:#FF0000;">"$cookie_degeri"</span>, <a href="http://www.php.net/time"><span style="color:#000066;">time</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>+<span style="color:#CC66CC;color:#800000;">3600</span>, <span style="color:#FF0000;">".byumut.com"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000; font-style:italic;"># Şeklinde oluşturduğumuz cookieler byumut.com domaini altındaki tüm subdomainlerde çalışacaktır . </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Peki ya sadece http protokolü altında cookilerimizi çalıştırmak istersek yapmamız gereken ne olabilirdi ? </p>
<p><strong>Oda şu şekilde : </strong></p>
<div class="igBar"><span id="lphp-19"><a href="#" onclick="javascript:showPlainTxt('php-19'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-19">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$cookie_degeri</span> = <span style="color:#CC66CC;color:#800000;">1</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/setcookie"><span style="color:#000066;">setcookie</span></a> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"Cookie_adi"</span>, <span style="color:#FF0000;">"$cookie_degeri"</span>, <a href="http://www.php.net/time"><span style="color:#000066;">time</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>+<span style="color:#CC66CC;color:#800000;">3600</span>, <span style="color:#FF0000;">".byumut.com"</span> , <span style="color:#CC66CC;color:#800000;">1</span> <span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000; font-style:italic;"># En son kısıma koyduğumuz 1 rakamı bizim cookiemizi sadece http protokolü altında çalışmasına izin verir . </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><strong>Peki sitemiz üzerinde oluşturduğumuz tüm cookileri nasıl görebiliriz ?</strong> </p>
<div class="igBar"><span id="lphp-20"><a href="#" onclick="javascript:showPlainTxt('php-20'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-20">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;pre&gt;'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/print_r"><span style="color:#000066;">print_r</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$_COOKIE</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;/pre&gt;'</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Cookie ve setcookie hakkında daha detaylı bilgiyi almak isterseniz php.net adresine başvurabilirsiniz .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.byumut.com/fonksiyon-kutuphanesi-cookie-setcookie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fonksiyon Kütüphanesi &#8211; Array_unshift , Array_push</title>
		<link>http://www.byumut.com/fonksiyon-kutuphanesi-array_unshift-array_push/</link>
		<comments>http://www.byumut.com/fonksiyon-kutuphanesi-array_unshift-array_push/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 21:33:59 +0000</pubDate>
		<dc:creator>byumut</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[array_push]]></category>
		<category><![CDATA[array_unshift]]></category>
		<category><![CDATA[fonksiyon]]></category>
		<category><![CDATA[fonksiyon kütüphanesi]]></category>
		<category><![CDATA[php fonksiyon]]></category>

		<guid isPermaLink="false">http://www.byumut.com/?p=367</guid>
		<description><![CDATA[Array_unshift ve Array_push fonksiyonları herhangi verilen bir diziye eklemeler yapar . Array_Push verilen array ' ın ( Dizinin ) sonuna bir değer eklenmesini sağlarken array_unshift ise array ' ın ( Dizinin ) başına bir değer eklenebilmesini sağlar . Şimdi bir kaç örnek verelim : PLAIN TEXT PHP: $dizi = array&#40;"2","3","4"&#41;; // Dizi Oluşturduk . &#160; [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.php.net/array_unshift">Array_unshift</a> ve <a href="http://www.php.net/array_push">Array_push</a> fonksiyonları herhangi verilen bir diziye eklemeler yapar .<br />
<a href="http://www.php.net/array_push">Array_Push </a>verilen <a href="http://www.php.net/array">array</a> ' ın ( Dizinin ) <strong>sonuna</strong> bir değer eklenmesini sağlarken <a href="http://www.php.net/array_unshift">array_unshift</a> ise <a href="http://www.php.net/array">array</a> ' ın ( Dizinin ) <strong>başına</strong> bir değer eklenebilmesini sağlar .<br />
<span id="more-367"></span><br />
<strong>Şimdi bir kaç örnek verelim :</strong> </p>
<div class="igBar"><span id="lphp-24"><a href="#" onclick="javascript:showPlainTxt('php-24'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-24">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$dizi</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"2"</span>,<span style="color:#FF0000;">"3"</span>,<span style="color:#FF0000;">"4"</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#FF9933; font-style:italic;">// Dizi Oluşturduk . </span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;pre&gt;'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.php.net/print_r"><span style="color:#000066;">print_r</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dizi</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;/pre&gt;'</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<blockquote><p><strong>Ekran Çıktısı : </strong></p>
<p>Array<br />
     (<br />
    [0] => 2<br />
    [1] => 3<br />
    [2] => 4<br />
      )</p></blockquote>
<p><strong>Şimdi dizimizin sonuna 5 ve 6 rakamlarını ekleyelim :</strong> </p>
<div class="igBar"><span id="lphp-25"><a href="#" onclick="javascript:showPlainTxt('php-25'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-25">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$dizi</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"2"</span>,<span style="color:#FF0000;">"3"</span>,<span style="color:#FF0000;">"4"</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#FF9933; font-style:italic;">// Var Olan Dizimiz ... </span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/array_push"><span style="color:#000066;">array_push</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dizi</span>,<span style="color:#FF0000;">"5"</span>,<span style="color:#FF0000;">"6"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;pre&gt;'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.php.net/print_r"><span style="color:#000066;">print_r</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dizi</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;/pre&gt;'</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<blockquote><p><strong>Ekran Çıktısı : </strong></p>
<p>Array<br />
     (<br />
    [0] => 2<br />
    [1] => 3<br />
    [2] => 4<br />
    [3] => 5<br />
    [4] => 6<br />
      )</p></blockquote>
<p>Görüldüğü gibi <a href="http://www.php.net/array_push">array_push</a> fonksiyonu varolan dizimizin üzerine 5 ve 6 rakamlarını ekledi . Şimdi <a href="http://www.php.net/array_unshift">array_unshift</a> fonksiyonuna bakalım ..</p>
<p><strong>Dizimizin başına 0 ve 1 rakamlarını ekleyelim : </strong></p>
<div class="igBar"><span id="lphp-26"><a href="#" onclick="javascript:showPlainTxt('php-26'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-26">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$dizi</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"2"</span>,<span style="color:#FF0000;">"3"</span>,<span style="color:#FF0000;">"4"</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#FF9933; font-style:italic;">// Var Olan Dizimiz ... </span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/array_unshift"><span style="color:#000066;">array_unshift</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dizi</span>,<span style="color:#FF0000;">"0"</span>,<span style="color:#FF0000;">"1"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;pre&gt;'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.php.net/print_r"><span style="color:#000066;">print_r</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dizi</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;/pre&gt;'</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<blockquote><p><strong>Ekran Çıktısı : </strong></p>
<p>Array<br />
     (<br />
    [0] => 0<br />
    [1] => 1<br />
    [2] => 2<br />
    [3] => 3<br />
    [4] => 4<br />
      )</p></blockquote>
<p><strong>Sonuç : </strong></p>
<p>array_push , array_unshift fonksiyonları ile istenilen tarafa ( baş , son ) istenilen veri eklenip çıkartılabilimektedir . </p>
]]></content:encoded>
			<wfw:commentRss>http://www.byumut.com/fonksiyon-kutuphanesi-array_unshift-array_push/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fonksiyon Kütüphanesi &#8211; Array 2 ( Count )</title>
		<link>http://www.byumut.com/fonksiyon-kutuphanesi-array-2-count-2/</link>
		<comments>http://www.byumut.com/fonksiyon-kutuphanesi-array-2-count-2/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 08:45:28 +0000</pubDate>
		<dc:creator>byumut</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[array 2]]></category>
		<category><![CDATA[count]]></category>
		<category><![CDATA[fonksiyon]]></category>
		<category><![CDATA[fonksiyon kütüphanesi]]></category>
		<category><![CDATA[php fonksiyon]]></category>

		<guid isPermaLink="false">http://www.byumut.com/?p=220</guid>
		<description><![CDATA[Fonksiyon kütüphanesi yazı dizisine ilk olarak Array 1 ile başlamıştık şimdi ise array 2 yani count ile devam ediyoruz . Count nedir ve count ile bir kaç örnek verirmisiniz sorularına cevap arıyacağız bugün arkadaşlar . Count php programlamada sayma işlemlerini yapmak için kullanılır , yani bir dizi içerisinde kaç tane eleman olduğunu saymamız gerektiğinde count [...]]]></description>
			<content:encoded><![CDATA[<p>Fonksiyon kütüphanesi yazı dizisine ilk olarak <a href="http://www.byumut.com/fonksiyon-kutuphanesi-array/">Array 1</a> ile başlamıştık şimdi ise array 2 yani <a href="http://www.php.net/count">count</a>  ile devam ediyoruz .<br />
Count nedir ve count ile bir kaç örnek verirmisiniz sorularına cevap arıyacağız bugün arkadaşlar .<br />
<span id="more-220"></span></p>
<p>Count php programlamada sayma işlemlerini yapmak için kullanılır , yani bir dizi içerisinde kaç tane eleman olduğunu saymamız gerektiğinde count fonksiyonunu kullanırız . </p>
<p>Örnek : </p>
<div class="igBar"><span id="lphp-29"><a href="#" onclick="javascript:showPlainTxt('php-29'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-29">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$a</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#CC66CC;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#CC66CC;color:#800000;">1</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$a</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#CC66CC;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#CC66CC;color:#800000;">3</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$a</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#CC66CC;color:#800000;">2</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#CC66CC;color:#800000;">5</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$result</span> = <a href="http://www.php.net/count"><span style="color:#000066;">count</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$a</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#0000FF;">$result</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// 3 çıktısı ekranda gözükecektir . </span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>İşte yukarıdaki örnekte'de basit bir şekilde gösterildiği gibi bir dizide kaç adet eleman olduğunu merak ediyorsak en başta başvurmamız gereken fonksiyon count fonksiyonudur . </p>
<p>Peki birde şu şekilde bir olay var tabi dizi içerisinde diziler olduğunu düşünelim , bu durumda dizi içerisinde diziler varken count fonksiyonu kullandığımızda count acaba hangi elemanları sayacak ? Tüm dizi içerisindeki dizilerde dahil olmak üzere tüm dizilerin toplam eleman sayısınımı sayacak yoksa root dizi konumundaki en üst dizideki eleman sayısını mı bize verecek ? İşte bunlar bizim kafamızı karıştıran sorulardan bazıları şimdi bunların çözümüne bakalım . </p>
<p>Örnek : </p>
<div class="igBar"><span id="lphp-30"><a href="#" onclick="javascript:showPlainTxt('php-30'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-30">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$food</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'fruits'</span> =&gt; <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'orange'</span>, <span style="color:#FF0000;">'banana'</span>, <span style="color:#FF0000;">'apple'</span><span style="color:#006600; font-weight:bold;">&#41;</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF0000;">'veggie'</span> =&gt; <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'carrot'</span>, <span style="color:#FF0000;">'collard'</span>, <span style="color:#FF0000;">'pea'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// recursive count</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <a href="http://www.php.net/count"><span style="color:#000066;">count</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$food</span>, COUNT_RECURSIVE<span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#FF9933; font-style:italic;">// output 8</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// normal count</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <a href="http://www.php.net/count"><span style="color:#000066;">count</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$food</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#FF9933; font-style:italic;">// output 2</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Örnekte de gördüğünüz gibi  <strong>" count($food, COUNT_RECURSIVE);  "</strong> şeklinde kullanılmış bir ifadede ne kadar dizi içinde dizi olursa olsun tüm dizilerdeki toplam eleman sayısını almış oluyoruz burada eğer <strong>COUNT_RECURSIVE</strong> ifadesini kullanmazsak root dizindeki dizinin eleman sayısını veriyor bir alt dizideki eleman sayılarını görmüyoruz bile . </p>
<p>İşte count fonksiyonu bu şekilde arkadaşlar umarım faydalı olmuşuzdur . </p>
]]></content:encoded>
			<wfw:commentRss>http://www.byumut.com/fonksiyon-kutuphanesi-array-2-count-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
