<?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>Biggle&#039;s Blog &#187; PHP</title>
	<atom:link href="http://www.biggle.de/blog/tag/php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.biggle.de/blog</link>
	<description>Web- und Software Development</description>
	<lastBuildDate>Tue, 07 Feb 2012 13:08:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Arrays</title>
		<link>http://www.biggle.de/blog/elearning/php/arrays</link>
		<comments>http://www.biggle.de/blog/elearning/php/arrays#comments</comments>
		<pubDate>Wed, 25 Aug 2010 19:01:54 +0000</pubDate>
		<dc:creator>Mario Priebe</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.biggle.de/blog</guid>
		<description><![CDATA[In einem Array ist es möglich eine verkettete Liste zu speichern. Man unterscheidet zwischen ein- und mehrdimensionalen und assoziative Arrays. eindimensionale Arrays Das eindimensionale Array ist vergleichbar mit einer einfachen Liste mit einem Index. Elemente vom gleichen Typ werden über den Index (ab 0 zählend)  nebeneinander abgelegt. $arr&#91;0&#93; erstes Element im Array $arr&#91;8&#93;  neuntes Element [...]]]></description>
			<content:encoded><![CDATA[<p>In einem Array ist es möglich eine verkettete Liste zu speichern. Man unterscheidet zwischen ein- und mehrdimensionalen und assoziative Arrays.</p>
<h2>eindimensionale Arrays</h2>
<p>Das eindimensionale Array ist vergleichbar mit einer einfachen Liste mit einem Index. Elemente vom gleichen Typ werden über den Index (ab 0 zählend)  nebeneinander abgelegt.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$arr</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> erstes Element im <span style="color: #990000;">Array</span>
<span style="color: #000088;">$arr</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">8</span><span style="color: #009900;">&#93;</span>  neuntes Element im <span style="color: #990000;">Array</span></pre></div></div>

<h2>mehrdimensional Arrays</h2>
<p>Bei mehrdimensionale Arrays ist es möglich mehrere Dimensionen abzulegen.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$arr</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span>      <span style="color: #666666; font-style: italic;">//erstes Element im ersten Array</span>
<span style="color: #000088;">$arr</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span>       <span style="color: #666666; font-style: italic;">//zweites Element im ersten Array</span>
<span style="color: #000088;">$arr</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">11</span><span style="color: #009900;">&#93;</span>     <span style="color: #666666; font-style: italic;">//zwölftes Element im dritten Array</span>
<span style="color: #000088;">$arr</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#93;</span>  <span style="color: #666666; font-style: italic;">//viertes Element im dritten Array vom sechsten Array</span></pre></div></div>

<p>usw.</p>
<h2>assoziative Arrays</h2>
<p>Ein assoziatives Array ist sowas wie ein Array von Dictionaries. Hier wird der Index in lesbarer Form abgelegt, wodurch der Zugriff auf die Elemente im Array vereinfacht wird.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$person</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Priebe'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$person</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'firstname'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Mario'</span><span style="color: #339933;">;</span></pre></div></div>

<p>oder alternativ</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$person</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Priebe'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'firstname'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Mario'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Der Zugriff auf das Array erfolgt auch hier über den Index</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #000088;">$person</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'vorname'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Um die Struktur eines Array auszugeben, verwendet man den print_r (rekursiven Print-Befehl)</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$person</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Priebe'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'firstname'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Mario'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">print_r</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$person</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Ausgabe: Array ( [name] => Priebe [firstname] => Mario )</p>
<p><br class="spacer_" /></p>
<h2>globale Arrays</h2>
<p>Es gibt auch jede Menge von globalen Arrays unter PHP, wie z.B.<br />
$_SERVER, $_POST, $_GET, $_SESSION, $_COCKIE<br />
mit print_r kann man sich auch diese Strukturen der Arrays anschauen, oder die <a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5waHAubmV0L2RvY3MucGhw">Dokumentation</a> bemühen.</p>
<hr /><p style="float:right; font-size:0.9em;">Dieser Beitrag stammt von <a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGU=">Mario Priebe</a>.</p> <img src="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=5232" width="1" height="1" style="display: none;" /><h2  class="related_post_title">Ähnliche Beiträge</h2><ul class="related_post"><li>3. Januar 2010 -- <a href="http://www.biggle.de/blog/aktuelles-copyright-datum-im-footer" title="Aktuelles &#8220;Copyright&#8221; Datum im Footer">Aktuelles &#8220;Copyright&#8221; Datum im Footer</a></li><li>19. Dezember 2009 -- <a href="http://www.biggle.de/blog/datenbankverbindung-php-mysql" title="Datenbankverbindung PHP / MySQL">Datenbankverbindung PHP / MySQL</a></li><li>18. November 2009 -- <a href="http://www.biggle.de/blog/php-entwicklungsumgebung-auf-windows" title="PHP Entwicklungsumgebung unter Windows">PHP Entwicklungsumgebung unter Windows</a></li><li>1. August 2009 -- <a href="http://www.biggle.de/blog/php-foreach-und-javascript" title="PHP foreach und Javascript">PHP foreach und Javascript</a></li><li>1. Juli 2009 -- <a href="http://www.biggle.de/blog/embeddedvalidswf-php-snippet" title="EmbeddedValidSwf &#8211; PHP Snippet">EmbeddedValidSwf &#8211; PHP Snippet</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.biggle.de/blog/elearning/php/arrays/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aktuelles &#8220;Copyright&#8221; Datum im Footer</title>
		<link>http://www.biggle.de/blog/aktuelles-copyright-datum-im-footer</link>
		<comments>http://www.biggle.de/blog/aktuelles-copyright-datum-im-footer#comments</comments>
		<pubDate>Sun, 03 Jan 2010 21:10:04 +0000</pubDate>
		<dc:creator>Mario Priebe</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[CodeSnippet]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.biggle.de/blog/?p=3602</guid>
		<description><![CDATA[Peruns Weblog erinnert daran, das Datum im Footer zu aktualisieren und zeigt auch einen php-oneliner der das Jahr aktuell halten soll. Folgendes Snippet legt noch einen drauf und gibt den Zeitraum vom ersten bis zum letzten Posting aus, welches Du in deinem Blog geschrieben hast: Copyright © 2008-2010 1 2 3 4 5 6 7 [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5wZXJ1bi5uZXQvMjAxMC8wMS8wMi9rb3JyaWdpZXJ0LWV1cmUtaGlud2Vpc2UtZnVlci1kaWUtY29weXJpZ2h0LWphaHJlLw==">Peruns Weblog</a> erinnert daran, das Datum im Footer zu aktualisieren und zeigt auch einen php-oneliner der das Jahr aktuell halten soll.</p>
<p>Folgendes Snippet legt noch einen drauf und gibt den Zeitraum vom ersten bis zum letzten Posting aus, welches Du in deinem Blog geschrieben hast: Copyright ©  2008-2010</p>
<p><br class="spacer_" /></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
    <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$post_datetimes</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_row</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">prepare</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT YEAR(min(post_date_gmt)) AS firstyear, YEAR(max(post_date_gmt)) AS lastyear FROM <span style="color: #006699; font-weight: bold;">$wpdb-&gt;posts</span> WHERE post_date_gmt &gt; 1970&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$post_datetimes</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$firstpost</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$post_datetimes</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">firstyear</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$lastpost</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$post_datetimes</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">lastyear</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #000088;">$copyright</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Copyright &amp;copy;&amp;nbsp;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$firstpost</span><span style="color: #339933;">;</span>
            <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$firstpost</span> <span style="color: #339933;">!=</span> <span style="color: #000088;">$lastpost</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    <span style="color: #000088;">$copyright</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'-'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$lastpost</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
            <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$copyright</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p><br class="spacer_" /></p>
<hr /><p style="float:right; font-size:0.9em;">Dieser Beitrag stammt von <a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGU=">Mario Priebe</a>.</p> <img src="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=3602" width="1" height="1" style="display: none;" /><h2  class="related_post_title">Ähnliche Beiträge</h2><ul class="related_post"><li>17. Oktober 2008 -- <a href="http://www.biggle.de/blog/letzten-10-updates-w3c-valid" title="Letzten 10 Updates W3C Valid">Letzten 10 Updates W3C Valid</a></li><li>9. September 2008 -- <a href="http://www.biggle.de/blog/willkommen-zuruck-wp-snippet" title="Willkommen zurück WP-Snippet">Willkommen zurück WP-Snippet</a></li><li>19. Dezember 2009 -- <a href="http://www.biggle.de/blog/datenbankverbindung-php-mysql" title="Datenbankverbindung PHP / MySQL">Datenbankverbindung PHP / MySQL</a></li><li>17. Oktober 2008 -- <a href="http://www.biggle.de/blog/ebay-live-price-watcher" title="Ebay Live Price-Watcher">Ebay Live Price-Watcher</a></li><li>28. Dezember 2011 -- <a href="http://www.biggle.de/blog/websequencediagrams-api-mit-net" title="WebSequenceDiagrams API mit .NET">WebSequenceDiagrams API mit .NET</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.biggle.de/blog/aktuelles-copyright-datum-im-footer/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Datenbankverbindung PHP / MySQL</title>
		<link>http://www.biggle.de/blog/datenbankverbindung-php-mysql</link>
		<comments>http://www.biggle.de/blog/datenbankverbindung-php-mysql#comments</comments>
		<pubDate>Sat, 19 Dec 2009 13:03:02 +0000</pubDate>
		<dc:creator>Mario Priebe</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[CodeSnippet]]></category>
		<category><![CDATA[MySQ]]></category>

		<guid isPermaLink="false">http://www.biggle.de/blog/?p=3415</guid>
		<description><![CDATA[Das folgende CodeSnippet zeigt, wie man PHP und MySQL miteinander verbindet und Daten eines Querys verarbeitet. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 &#60;?php /* * by Mario.Priebe (c)2009 * MySQL SimpleConnection * www.biggle.de */ &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Das folgende CodeSnippet zeigt, wie man PHP und MySQL miteinander verbindet und Daten eines Querys verarbeitet.</p>
<p><br class="spacer_" /></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">/* 
 * by Mario.Priebe (c)2009 
 * MySQL SimpleConnection
 * www.biggle.de 
*/</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//connectionstring</span>
<span style="color: #000088;">$con</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysqli_connect</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;localhost&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;username&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;password&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;datenbankname&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//connection exist or available</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$con</span><span style="color: #009900;">&#41;</span> 
  <span style="color: #009900;">&#123;</span> <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Verbindung fehlgeschlagen'</span> <span style="color: #339933;">.</span> <span style="color: #990000;">mysqli_connect_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">//query</span>
  <span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysqli_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT * FROM Contacts&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">//fetching data</span>
  <span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysqli_fetch_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'lastname'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span>  <span style="color: #0000ff;">&quot;, &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'firstname'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">//close connection</span>
  <span style="color: #990000;">mysqli_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$con</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<hr /><p style="float:right; font-size:0.9em;">Dieser Beitrag stammt von <a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGU=">Mario Priebe</a>.</p> <img src="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=3415" width="1" height="1" style="display: none;" /><h2  class="related_post_title">Ähnliche Beiträge</h2><ul class="related_post"><li>3. Januar 2010 -- <a href="http://www.biggle.de/blog/aktuelles-copyright-datum-im-footer" title="Aktuelles &#8220;Copyright&#8221; Datum im Footer">Aktuelles &#8220;Copyright&#8221; Datum im Footer</a></li><li>17. Oktober 2008 -- <a href="http://www.biggle.de/blog/letzten-10-updates-w3c-valid" title="Letzten 10 Updates W3C Valid">Letzten 10 Updates W3C Valid</a></li><li>17. Oktober 2008 -- <a href="http://www.biggle.de/blog/ebay-live-price-watcher" title="Ebay Live Price-Watcher">Ebay Live Price-Watcher</a></li><li>9. September 2008 -- <a href="http://www.biggle.de/blog/willkommen-zuruck-wp-snippet" title="Willkommen zurück WP-Snippet">Willkommen zurück WP-Snippet</a></li><li>28. Dezember 2011 -- <a href="http://www.biggle.de/blog/websequencediagrams-api-mit-net" title="WebSequenceDiagrams API mit .NET">WebSequenceDiagrams API mit .NET</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.biggle.de/blog/datenbankverbindung-php-mysql/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Entwicklungsumgebung unter Windows</title>
		<link>http://www.biggle.de/blog/php-entwicklungsumgebung-auf-windows</link>
		<comments>http://www.biggle.de/blog/php-entwicklungsumgebung-auf-windows#comments</comments>
		<pubDate>Wed, 18 Nov 2009 21:14:28 +0000</pubDate>
		<dc:creator>Mario Priebe</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.biggle.de/blog/?p=3269</guid>
		<description><![CDATA[Hier möchte ich gerne zeigen, wie man sich auf dem Windowssysstem eine PHP-Entwicklungsumgebung einrichtet. Ich verwende dazu die Programme XAMPP und ...]]></description>
			<content:encoded><![CDATA[<p>Heute möchte ich gerne zeigen, wie man sich auf dem Windowssysstem eine PHP-Entwicklungsumgebung einrichtet. Ich verwende dazu die kostenlos verfügbaren Programme <a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5hcGFjaGVmcmllbmRzLm9yZy9kZS94YW1wcC13aW5kb3dzLmh0bWwjNjI4">XAMPP</a> und <a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5lYXN5ZWNsaXBzZS5vcmcvc2l0ZS9kaXN0cmlidXRpb25zL3BocC5odG1s">EasyEclipse for PHP</a>.</p>
<p>Diese beiden Programme sollten herunter geladen und installiert werden. Die Reihenfolge sollte nicht relevant sein, schlage aber vor XAMPP als erstes zu installieren.</p>
<p>Nach Installation dieser, müssen wir EasyEclipse einrichten. Dazu gehen wir wie folgt vor.</p>
<p>Zuerst werden wir uns in Eclipse die PHP Umgebung einschalten. Hier geht man vorerst nach dem Start von Eclipse auf der rechten Seite auf Workbench und es werden alle Views der Umgebung geladen.</p>
<p>Wenn man nun rechts oben auf Resources / Other geht,</p>
<p><a rel=\"thumbnail\" href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGUvYmxvZy93cC1jb250ZW50L3VwbG9hZHMvMjAwOS8xMS9Ib3dUb1BocE9uV2luZG93czYuanBn"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="HowToPhpOnWindows6" src="http://www.biggle.de/blog/wp-content/uploads/2009/11/HowToPhpOnWindows6_thumb.jpg" border="0" alt="HowToPhpOnWindows6" width="285" height="266" /></a></p>
<p>findet man nachfolgend eine weitere Perspektive, wo wir dann PHP auswählen.</p>
<p><a rel=\"thumbnail\" href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGUvYmxvZy93cC1jb250ZW50L3VwbG9hZHMvMjAwOS8xMS9Ib3dUb1BocE9uV2luZG93czcuanBn"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="HowToPhpOnWindows7" src="http://www.biggle.de/blog/wp-content/uploads/2009/11/HowToPhpOnWindows7_thumb.jpg" border="0" alt="HowToPhpOnWindows7" width="244" height="217" /></a></p>
<p>Nun müssen wir XAMPP und EasyEclipse miteinander verknüpfen. (Wenn man C:\ als Installationspfad gelassen hat sollte eigtl. alles gut sein, jedoch schauen wir hier nochmal nach.)</p>
<p>Dazu selektieren wir Window/Preferences</p>
<p><a rel=\"thumbnail\" href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGUvYmxvZy93cC1jb250ZW50L3VwbG9hZHMvMjAwOS8xMS9Ib3dUb1BocE9uV2luZG93czguanBn"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="HowToPhpOnWindows8" src="http://www.biggle.de/blog/wp-content/uploads/2009/11/HowToPhpOnWindows8_thumb.jpg" border="0" alt="HowToPhpOnWindows8" width="194" height="244" /></a></p>
<p>Und gehen im linken Menu auf den Punkt XAMPP, siehe Abbildung</p>
<p><a rel=\"thumbnail\" href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGUvYmxvZy93cC1jb250ZW50L3VwbG9hZHMvMjAwOS8xMS9Ib3dUb1BocE9uV2luZG93czkuanBn"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="HowToPhpOnWindows9" src="http://www.biggle.de/blog/wp-content/uploads/2009/11/HowToPhpOnWindows9_thumb.jpg" border="0" alt="HowToPhpOnWindows9" width="244" height="171" /></a></p>
<p>Auf der rechten Seite sind dann die Pfade vorgegeben, diese sollten mit der Installation von XAMPP übereinstimmen.</p>
<p>Nun starten wir XAMPP über die EclipseUmgebung.</p>
<p><a rel=\"thumbnail\" href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGUvYmxvZy93cC1jb250ZW50L3VwbG9hZHMvMjAwOS8xMS9Ib3dUb1BocE9uV2luZG93czEwLmpwZw=="><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="HowToPhpOnWindows10" src="http://www.biggle.de/blog/wp-content/uploads/2009/11/HowToPhpOnWindows10_thumb.jpg" border="0" alt="HowToPhpOnWindows10" width="250" height="139" /></a></p>
<p>In der unten stehenden Konsole sollten wir dazu auch eine Erfolgsmeldung bekommen.</p>
<p><a rel=\"thumbnail\" href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGUvYmxvZy93cC1jb250ZW50L3VwbG9hZHMvMjAwOS8xMS9Ib3dUb1BocE9uV2luZG93czEzLmpwZw=="><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="HowToPhpOnWindows13" src="http://www.biggle.de/blog/wp-content/uploads/2009/11/HowToPhpOnWindows13_thumb.jpg" border="0" alt="HowToPhpOnWindows13" width="373" height="182" /></a></p>
<p>Nun rufen  wir im Browser deiner Wahl die lokale URL auf, die 127.0.0.1 oder localhost lautet und sollten dann, nachdem wir unter dem XAMPP-Logo und auf Deutsch geklickt haben, folgende Meldung sehen.</p>
<p><a rel=\"thumbnail\" href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGUvYmxvZy93cC1jb250ZW50L3VwbG9hZHMvMjAwOS8xMS9Ib3dUb1BocE9uV2luZG93czMuanBn"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="HowToPhpOnWindows3" src="http://www.biggle.de/blog/wp-content/uploads/2009/11/HowToPhpOnWindows3_thumb.jpg" border="0" alt="HowToPhpOnWindows3" width="504" height="185" /></a></p>
<p>Nach einem Klick auf Status im linken Menü sollten wir eine Übersicht bekommen, welche Dienste denn alle aktiviert sind.</p>
<p><a rel=\"thumbnail\" href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGUvYmxvZy93cC1jb250ZW50L3VwbG9hZHMvMjAwOS8xMS9Ib3dUb1BocE9uV2luZG93czExLmpwZw=="><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="HowToPhpOnWindows11" src="http://www.biggle.de/blog/wp-content/uploads/2009/11/HowToPhpOnWindows11_thumb.jpg" border="0" alt="HowToPhpOnWindows11" width="504" height="352" /></a></p>
<p>Den Browser können wir jetzt wieder schließen und in der Umgebung uns die selbe URL im integrierten Browser aufrufen</p>
<p><a rel=\"thumbnail\" href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGUvYmxvZy93cC1jb250ZW50L3VwbG9hZHMvMjAwOS8xMS9Ib3dUb1BocE9uV2luZG93czEyLmpwZw=="><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="HowToPhpOnWindows12" src="http://www.biggle.de/blog/wp-content/uploads/2009/11/HowToPhpOnWindows12_thumb.jpg" border="0" alt="HowToPhpOnWindows12" width="520" height="370" /></a></p>
<p>Wenn auch das geklappt hat, kann es eigentlich los gehen. Vorher jedoch müssen wir noch den “htdocs” Ordner als Dokumentenroot definieren.</p>
<p>Dazu gehen wir unter Window/Preferences auf das unten in der Abbildung markierte ”Item “ProjectDefaults und tragen hier auf der rechten Seite den Pfads zum htdocs-Verzeichnis innerhalb des XAMPP Verzeichnisses ein.</p>
<p><a rel=\"thumbnail\" href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGUvYmxvZy93cC1jb250ZW50L3VwbG9hZHMvMjAwOS8xMS9Ib3dUb1BocE9uV2luZG93czE0LmpwZw=="><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="HowToPhpOnWindows14" src="http://www.biggle.de/blog/wp-content/uploads/2009/11/HowToPhpOnWindows14_thumb.jpg" border="0" alt="HowToPhpOnWindows14" width="504" height="396" /></a></p>
<p>Nun können wir uns ein PHP Projekt anlegen. Dazu gehen wir auf der linken Seite in den Navigator und klicken mit der rechten Maustaste und erstellen uns dieses.</p>
<p><a rel=\"thumbnail\" href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGUvYmxvZy93cC1jb250ZW50L3VwbG9hZHMvMjAwOS8xMS9Ib3dUb1BocE9uV2luZG93czE1LmpwZw=="><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="HowToPhpOnWindows15" src="http://www.biggle.de/blog/wp-content/uploads/2009/11/HowToPhpOnWindows15_thumb.jpg" border="0" alt="HowToPhpOnWindows15" width="364" height="391" /></a></p>
<p><span style="text-decoration: underline;">Wichtig</span> ist, auch hier die Angabe, zu einem Ordner der sich im htdocs-Verzeichnis befindet, diesen müssen wir uns auch zuvor physikalisch anlegen.</p>
<p><a rel=\"thumbnail\" href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGUvYmxvZy93cC1jb250ZW50L3VwbG9hZHMvMjAwOS8xMS9Ib3dUb1BocE9uV2luZG93czE2LmpwZw=="><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="HowToPhpOnWindows16" src="http://www.biggle.de/blog/wp-content/uploads/2009/11/HowToPhpOnWindows16_thumb.jpg" border="0" alt="HowToPhpOnWindows16" width="504" height="413" /></a></p>
<p>In diesem Projekt können wir uns nun die erste PHP-Datei anlegen, dazu wieder Rechtsklick im Navigator, auf das Projekt und auf PHP File</p>
<p><a rel=\"thumbnail\" href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGUvYmxvZy93cC1jb250ZW50L3VwbG9hZHMvMjAwOS8xMS9Ib3dUb1BocE9uV2luZG93czE3LmpwZw=="><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="HowToPhpOnWindows17" src="http://www.biggle.de/blog/wp-content/uploads/2009/11/HowToPhpOnWindows17_thumb.jpg" border="0" alt="HowToPhpOnWindows17" width="413" height="327" /></a></p>
<p>Vergeben einen Namen, sinnvoll oder nicht, das ist egal : )</p>
<p><a rel=\"thumbnail\" href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGUvYmxvZy93cC1jb250ZW50L3VwbG9hZHMvMjAwOS8xMS9Ib3dUb1BocE9uV2luZG93czE4LmpwZw=="><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="HowToPhpOnWindows18" src="http://www.biggle.de/blog/wp-content/uploads/2009/11/HowToPhpOnWindows18_thumb.jpg" border="0" alt="HowToPhpOnWindows18" width="504" height="408" /></a></p>
<p>und schreiben unseren ersten Code. Hier sieht man nach dem Speichern des Files auch gleich im PHP Browser das Ergebnis</p>
<p><a rel=\"thumbnail\" href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGUvYmxvZy93cC1jb250ZW50L3VwbG9hZHMvMjAwOS8xMS9Ib3dUb1BocE9uV2luZG93czE5LmpwZw=="><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="HowToPhpOnWindows19" src="http://www.biggle.de/blog/wp-content/uploads/2009/11/HowToPhpOnWindows19_thumb.jpg" border="0" alt="HowToPhpOnWindows19" width="504" height="396" /></a></p>
<p>Das generierte Kommentartemplate kann man auch recht einfach anpassen. Hierzu geht wieder auf Window/Preferences und auf die unten in der Abbildung markierten Items bis zu CodeTemplates. Hier markiert man dann auf der rechten Seite New PHP Files und dann auf Edit.</p>
<p><a rel=\"thumbnail\" href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGUvYmxvZy93cC1jb250ZW50L3VwbG9hZHMvMjAwOS8xMS9Ib3dUb1BocE9uV2luZG93czIwLmpwZw=="><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="HowToPhpOnWindows20" src="http://www.biggle.de/blog/wp-content/uploads/2009/11/HowToPhpOnWindows20_thumb.jpg" border="0" alt="HowToPhpOnWindows20" width="504" height="232" /></a></p>
<p>An dieser Stelle, kann man nun sein eigenes PHP-File HeaderTemplate einrichten.</p>
<p><a rel=\"thumbnail\" href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGUvYmxvZy93cC1jb250ZW50L3VwbG9hZHMvMjAwOS8xMS9Ib3dUb1BocE9uV2luZG93czIxLmpwZw=="><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="HowToPhpOnWindows21" src="http://www.biggle.de/blog/wp-content/uploads/2009/11/HowToPhpOnWindows21_thumb.jpg" border="0" alt="HowToPhpOnWindows21" width="504" height="255" /></a></p>
<p>Zum Schluss noch einen letzten Screen, der zeigt das man vor dem Beenden von Eclipse auch den XAMPP wieder stoppen sollte.</p>
<p><a rel=\"thumbnail\" href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGUvYmxvZy93cC1jb250ZW50L3VwbG9hZHMvMjAwOS8xMS9Ib3dUb1BocE9uV2luZG93czIyLmpwZw=="><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="HowToPhpOnWindows22" src="http://www.biggle.de/blog/wp-content/uploads/2009/11/HowToPhpOnWindows22_thumb.jpg" border="0" alt="HowToPhpOnWindows22" width="244" height="170" /></a></p>
<p>So nun steht einem nichts mehr im Wege, bei der Entwicklung von PHP mit Eclipse auf einem Windowssystem.</p>
<p>Btw, wie  man auf dem einen oder anderen Screenshot sehen konnte, haben wir uns mit dem XAMPP Paket auch MySQL installiert, was uns natürlich auch im vollen Umfang zur Verfügung steht.</p>
<p>So nun viel Spaß beim entwickeln : )</p>
<hr /><p style="float:right; font-size:0.9em;">Dieser Beitrag stammt von <a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGU=">Mario Priebe</a>.</p> <img src="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=3269" width="1" height="1" style="display: none;" /><h2  class="related_post_title">Ähnliche Beiträge</h2><ul class="related_post"><li>3. Dezember 2010 -- <a href="http://www.biggle.de/blog/biggle-ist-kein-palindrom" title="Biggle ist kein Palindrom">Biggle ist kein Palindrom</a></li><li>7. Februar 2011 -- <a href="http://www.biggle.de/blog/c-programmieren-fuer-anfaenger" title="C Programmieren für Anfänger">C Programmieren für Anfänger</a></li><li>9. Januar 2011 -- <a href="http://www.biggle.de/blog/mehrfachvererbung-ein-beispiel-in-c" title="Mehrfachvererbung – Ein Beispiel in C#">Mehrfachvererbung – Ein Beispiel in C#</a></li><li>16. November 2010 -- <a href="http://www.biggle.de/blog/windows-phone-7-push-notification-implementierung-beispiel" title="Windows Phone 7 – Push Notification">Windows Phone 7 – Push Notification</a></li><li>1. November 2010 -- <a href="http://www.biggle.de/blog/bing-api-beispiel-csharp-quicky" title="Bing API Beispiel &#8211; C# Quicky">Bing API Beispiel &#8211; C# Quicky</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.biggle.de/blog/php-entwicklungsumgebung-auf-windows/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP foreach und Javascript</title>
		<link>http://www.biggle.de/blog/php-foreach-und-javascript</link>
		<comments>http://www.biggle.de/blog/php-foreach-und-javascript#comments</comments>
		<pubDate>Sat, 01 Aug 2009 18:55:44 +0000</pubDate>
		<dc:creator>Mario Priebe</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.biggle.de/blog/?p=2750</guid>
		<description><![CDATA[... um aus einem Verzeichnis alle Bilder auszulesen, die dann in einem Array an ein Javascript übergeben werden...]]></description>
			<content:encoded><![CDATA[<p>Hier habe ich mal einen kleinen Codeschnipsel geschrieben um aus einem Verzeichnis alle Bilder auszulesen, die dann in einem Array an ein Javascript übergeben werden.</p>
<p>Grund dafür war, das ich das “<a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5keW5hbWljZHJpdmUuY29tL2R5bmFtaWNpbmRleDE0L2Ryb3BpdHNsaWRlLmh0bQ==" target=\"_blank\">Drop-in Slideshow Script</a>” von DynamicDrive, dynamisch mit einer Bilderquelle versehen wollte.</p>
<p>Hier der Code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/* 
 * by Mario.Priebe (c)2009 
 * PHP-ImageArray from directory
 * This notice must stay intact for legal use.
 * www.biggle.de
 * for the dropSlideShow use http://www.dynamicdrive.com/dynamicindex14/dropitslide.htm
*/</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//define picturedir</span>
<span style="color: #000088;">$pic_dir</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'uploads/slideshow/'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//dont touch this if u dont know what u do</span>
<span style="color: #000088;">$d</span> <span style="color: #339933;">=</span> <span style="color: #990000;">dir</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pic_dir</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$entry</span><span style="color: #339933;">=</span><span style="color: #000088;">$d</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">read</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$entry</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">&quot;.&quot;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$entry</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">&quot;..&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$array</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$entry</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;script type=<span style="color: #000099; font-weight: bold;">\&quot;</span>text/javascript<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;var Images = new Array();<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$array</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$key</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$pic</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Images[<span style="color: #006699; font-weight: bold;">$key</span>] = [<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #006699; font-weight: bold;">$pic_dir</span><span style="color: #006699; font-weight: bold;">$pic</span><span style="color: #000099; font-weight: bold;">\&quot;</span>];<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000088;">$d</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;new dropinslideshow(Images, 150, 120, 3000)&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/script&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Viel Spass beim entwickeln : )</p>
<hr /><p style="float:right; font-size:0.9em;">Dieser Beitrag stammt von <a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGU=">Mario Priebe</a>.</p> <img src="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=2750" width="1" height="1" style="display: none;" /><h2  class="related_post_title">Ähnliche Beiträge</h2><ul class="related_post"><li>25. August 2010 -- <a href="http://www.biggle.de/blog/elearning/php/arrays" title="Arrays">Arrays</a></li><li>3. Januar 2010 -- <a href="http://www.biggle.de/blog/aktuelles-copyright-datum-im-footer" title="Aktuelles &#8220;Copyright&#8221; Datum im Footer">Aktuelles &#8220;Copyright&#8221; Datum im Footer</a></li><li>19. Dezember 2009 -- <a href="http://www.biggle.de/blog/datenbankverbindung-php-mysql" title="Datenbankverbindung PHP / MySQL">Datenbankverbindung PHP / MySQL</a></li><li>18. November 2009 -- <a href="http://www.biggle.de/blog/php-entwicklungsumgebung-auf-windows" title="PHP Entwicklungsumgebung unter Windows">PHP Entwicklungsumgebung unter Windows</a></li><li>1. Juli 2009 -- <a href="http://www.biggle.de/blog/embeddedvalidswf-php-snippet" title="EmbeddedValidSwf &#8211; PHP Snippet">EmbeddedValidSwf &#8211; PHP Snippet</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.biggle.de/blog/php-foreach-und-javascript/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

