Posted by : Dedy Al Islami Kamis, 10 Juni 2010


PHP adalah bahasa scripting yang kuat yang cocok dengan anggun ke HTML dan menempatkan alat untuk membuat website dinamis di tangan orang-orang - bahkan orang-orang seperti saya yang terlalu malas untuk belajar scripting Perl dan naas backend lain yang lebih rumit.

This tutorial is for the person who understands HTML but doesn't know much about PHP. Tutorial ini untuk orang yang memahami HTML tetapi tidak tahu banyak tentang PHP. One of PHP's greatest attributes is that it's a freely distributed open-source language, so there's all kinds of excellent reference material about it out there, which means that once you understand the basics, it's easy to find the materials that you need to push your skills. Salah satu atribut PHP terbesar adalah bahwa bahasa open source bebas didistribusikan, jadi ada semua jenis bahan referensi yang sangat baik tentang hal itu di luar sana, yang berarti bahwa setelah Anda memahami dasar-dasar, mudah untuk menemukan bahan yang Anda butuhkan untuk mendorong Anda keterampilan.

Pengenalan
What Is PHP? Apa itu PHP?

So, what is this whole PHP business all about? Jadi, apa ini bisnis seluruh PHP semua tentang?

PHP is a program that gets installed on top of your web server software. PHP adalah sebuah program yang terinstal di atas perangkat lunak server web Anda. It works with versions of Apache ( Tutorial:Apache for Beginners ), Microsoft IIS and other server software packages. Ia bekerja dengan versi Apache ( Tutorial: Apache untuk Pemula ), Microsoft IIS dan paket perangkat lunak server lain.

You use PHP by inserting PHP code inside the HTML that makes up your website. Anda menggunakan PHP dengan menyisipkan kode PHP di dalam HTML yang membentuk situs web Anda. When a client (anybody on the web) visits a web page that contains this code, your server executes it. Ketika klien (siapa pun di web) mengunjungi suatu halaman web yang berisi kode ini, server Anda dapat mengeksekusinya saat. That's why you need to install your own server in order to test PHP locally — the server is the brain here, not your browser. Itulah sebabnya anda perlu menginstal server Anda sendiri untuk menguji PHP secara lokal - server adalah otak di sini, bukan browser Anda. Users don't need any special plug-ins or anything to see your PHP in action — it gets to the end user as regular old-fashioned HTML. Pengguna tidak perlu plug-in khusus atau apapun untuk melihat Anda PHP dalam tindakan - itu sampai ke end user sebagai HTML kuno biasa.

PHP is a scripting language, like HTML. PHP adalah bahasa scripting, seperti HTML. That means that code does not need to be compiled before it gets used — it gets processed on the fly as necessary. Itu berarti bahwa kode tidak perlu dikompilasi sebelum terbiasa - karena mendapat diproses pada terbang seperti yang diperlukan.

Before we dig in, you should know about a site called PHP.net . Sebelum kita menggali, Anda harus tahu tentang situs disebut PHP.net . PHP is an open-source language, and PHP.net is its control center, with extensive reference material about the language and tips sent in by users across the globe. PHP adalah bahasa open-source, dan PHP.net adalah pusat kontrol, dengan materi referensi ekstensif tentang bahasa dan tips yang dikirimkan oleh pengguna di seluruh dunia. PHP.net has exceptional, deep information about the language, but it can be a little cryptic for the newcomer. PHP.net memiliki luar biasa, informasi yang mendalam tentang bahasa, tapi bisa menjadi sedikit samar untuk pendatang baru. We'll look more closely at how to use PHP.net at the end of this tutorial. Kita akan melihat lebih dekat bagaimana menggunakan PHP.net pada akhir tutorial ini.

So, what kinds of things can PHP do? Jadi, apa jenis hal yang dapat PHP lakukan? Welllll … it can: Welllll ... dapat:

* take info from web-based forms and use it in a million ways (store it in a database, create conditional pages depending on what the forms said, set cookies for later, send e-mail, write your mom on her birthday); mengambil info dari bentuk berbasis web dan menggunakannya dalam sejuta cara (menyimpannya dalam database, membuat halaman bersyarat tergantung pada apa bentuk kata, mengatur cookie untuk nanti, kirim e-mail, tulis ibu Anda pada hari ulang tahunnya);

* authenticate and track users; mengotentikasi dan pengguna melacak;

* run threaded discussions on your site; menjalankan berulir diskusi di situs Anda;

* serve different pages to people using different browsers or devices; melayani halaman yang berbeda untuk orang yang menggunakan browser yang berbeda atau perangkat;

* publish an entire website using just a single layout template (server-side includes-style); menerbitkan seluruh situs Web dengan menggunakan hanya satu tata letak template (server-side termasuk gaya);

* serve XML pages. melayani halaman XML.

But before we can get to the specific uses of PHP, we need to start with a quick preview of the building blocks of PHP, beginning with a sample script. Tapi sebelum kita bisa menggunakan PHP spesifik, kita harus mulai dengan cepat preview blok bangunan PHP, dimulai dengan sampel script. This example script is titled “chickenman.php.” When called by a web browser, it would simply read, “I am the CHICKEN MAN!” Contoh script ini adalah berjudul "chickenman.php" Ketika dipanggil oleh web browser., Itu hanya akan membaca, "Akulah MAN AYAM!"
view source
print?
1
2
3
4
5 print ("I am the CHICKEN MAN"); cetak ("Aku adalah MAN AYAM");
6
7
8
9 ?> ?>

The ?php and ?¢ tags start and end a PHP script, and your meat goes in the middle. php dan? ¢ tag? Awal dan akhir naskah PHP, dan daging Anda berjalan di tengah. Got that? Got itu? Good! Bagus! Now let's walk through the basic rules you need to know to before you can write your first PHP script. Sekarang mari kita berjalan melalui aturan dasar yang perlu Anda ketahui sebelum Anda dapat menulis script PHP pertama Anda.
What you'll need Apa yang Anda harus

Before we begin, you will need to install a server on your own machine in order to test your PHP scripts locally. Sebelum kita mulai, Anda akan perlu menginstal server pada komputer Anda sendiri untuk menguji script PHP anda secara lokal. You can install WampServer for Windows machines from http://www.wampserver.com/en/ In order to have a Localhost machine. Anda dapat menginstal WampServer untuk mesin Windows dari http://www.wampserver.com/en/ Dalam rangka untuk memiliki mesin Localhost. If you're using a Mac you can get MAMP from http://www.mamp.info . Jika Anda menggunakan Mac anda bisa mendapatkan MAMP dari http://www.mamp.info .

If you have space on a web server which supports PHP, you can also test your PHP there, but this is kind of a pain because it means you'll need to FTP your files or telnet in every time you want to change something. Jika Anda memiliki ruang pada web server yang mendukung PHP, Anda juga dapat menguji Anda PHP di sana, tapi ini adalah jenis sakit karena itu berarti Anda harus FTP file atau telnet dalam setiap kali Anda ingin mengubah sesuatu.
Steps Tangga
The Basics Dasar-dasar

The code itself fits right inside a page's HTML, and like HTML it is made up of plain ol' text. Kode sendiri pas di dalam suatu halaman HTML, dan seperti HTML ini terdiri dari dataran ol 'teks. So a page that displays the words “I am the CHICKEN MAN!” message would sit inside an HTML page named something.php, like this: Jadi sebuah halaman yang menampilkan kata-kata "Akulah MAN AYAM!" Pesan akan duduk di dalam sebuah halaman HTML bernama something.php, seperti ini:
view source
print?
01
02
03 Chicken Man Example Chicken Man Contoh </ title></span> <br />04 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"></head></span> </ Head></span> <br />05 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><body></span> <body></span> <br />06 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><font color="red">My PHP code makes this page say:</font></span> <font color="red"> kode PHP saya membuat ini mengatakan Halaman: </ font></span> <br />07 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><p></span> <p></span> <br />08 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><?php</span> <? Php</span> <br />09 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">print ("I am the CHICKEN MAN");</span> cetak ("Aku adalah MAN AYAM");</span> <br />10 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">?></span> ?></span> <br />11 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"></p></span> </ P></span> <br />12 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"></body></span> </ Body></span> <br />13 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"></html></span> </ Html></span> <br /> <br />See how that works? Lihat bagaimana cara kerjanya? The HTML is rendered as regular HTML, but everything inside the ?php and ?¢ tags gets processed as PHP. HTML diberikan sebagai HTML biasa, tetapi segala sesuatu di dalam ¢ php dan? Tag? Akan diproses sebagai PHP. <br />Basic Syntax Sintaks Dasar <br /> <br />It's time to write your own first PHP script. Sudah waktunya untuk menulis skrip PHP pertama Anda sendiri. The basic rules of PHP are as follows: Aturan dasar PHP adalah sebagai berikut: <br /> <br />Naming Files In order to get a PHP script working, the file it's in or the file that it calls to do the heavy lifting must end in .php (earlier versions used the file extensions .php3 and .phtml). Penamaan File Untuk mendapatkan kerja script PHP, file ini atau file yang mereka sebut untuk melakukan angkat berat harus diakhiri.. Php sebelumnya (versi digunakan file ekstensi php3 dan. Phtml). Like HTML, your files are saved as plain text. Seperti HTML, file Anda disimpan sebagai teks biasa. <br /> <br />Comments It's important to get in the habit of leaving notes about your code with the comment tags so that months down the road you can make sense of what you were trying to make your script do. Komentar Sangat penting untuk membiasakan meninggalkan catatan tentang kode anda dengan tag komentar, sehingga bulan menuruni jalan, Anda dapat memahami apa yang Anda coba untuk membuat script Anda lakukan. The way you set comments apart from your code (that you don't want displayed or executed) is with either “//” at the beginning of each line, or surrounded by “/*” and “*/” if you want to comment out several lines: Cara Anda mengatur komentar terpisah dari kode Anda (yang Anda tidak ingin ditampilkan atau dijalankan) adalah dengan baik "/ /" di awal setiap baris, atau dikelilingi oleh "/ *" dan "* /" jika Anda ingin komentar dari beberapa baris: <br />view source <br />print? <br />01 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><?php</span> <? Php</span> <br />02 <br />03 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">// This will be ignored.</span> / / Ini akan diabaikan.</span> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">Note to self:</span> Catatan untuk diri sendiri:</span> <br />04 <br />05 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">// Pick up ice cream, cake, and balloons.</span> / / Ambil es krim, kue, dan balon.</span> <br />06 <br />07 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">print ("I am the CHICKEN MAN");</span> cetak ("Aku adalah MAN AYAM");</span> <br />08 <br />09 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">/*</span> / *</span> <br />10 <br />11 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">This, too, will be ignored.</span> Ini juga akan diabaikan.</span> <br />12 <br />13 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">Hey, and don't forget</span> Hei, dan jangan lupa</span> <br />14 <br />15 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">the spanking machine!</span> mesin memukul!</span> <br />16 <br />17 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">*/</span> * /</span> <br />18 <br />19 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">?></span> ?></span> <br />Code Syntax Sintaks Kode <br /> <br />Start of Code Every piece of PHP code begins with “<?php” (or the abbreviated “<?” if your server is configured to handle that). Mulai dari Kode Setiap potongan kode PHP dimulai dengan "<?? Php" (atau disingkat "<" jika server Anda dikonfigurasi untuk menangani itu). <br /> <br />End of Code The way to signify that the PHP code is finished is by adding “?>” at the end. Akhir Kode Cara untuk menandakan bahwa kode PHP sudah selesai adalah dengan menambahkan "?>" Di akhir. <br /> <br />Every Chunk With a few exceptions, each separate instruction that you write will end with a semicolon. Setiap bingkah Dengan beberapa pengecualian, setiap instruksi terpisah yang Anda tulis akan diakhiri dengan titik koma. <br /> <br />Parentheses The typical function looks like this … Kurung Fungsi khas terlihat seperti ini ... <br />view source <br />print? <br />1 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">print ( );</span> cetak ();</span> <br /> <br />… where “print” is the function and the stuff that the function works on sits inside the parentheses, with a semicolon to finish it off. ... Di mana "print" adalah fungsi dan hal-hal bahwa fungsi bekerja pada duduk di dalam kurung, dengan tanda titik koma untuk menyelesaikannya. (Just to confuse you, “print” is the exception that also works without parentheses.) By the way, echo () is the same as print (). (Hanya untuk membingungkan Anda, "cetak" adalah pengecualian yang juga bekerja tanpa kurung) By the way., Echo () adalah sama dengan print (). <br /> <br />Much like HTML, the actual formatting of your PHP code (where you put spaces, line breaks, etc.) will not affect the outcome except those parts of the code that tell a web browser how to display your page. Sama seperti HTML, format sebenarnya dari kode PHP Anda (di mana Anda meletakkan spasi, jeda baris, dll) tidak akan mempengaruhi hasil kecuali bagian-bagian kode yang mengatakan web browser bagaimana menampilkan halaman Anda. So this piece of code … Jadi ini bagian dari kode ... <br />view source <br />print? <br />01 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><?php</span> <? Php</span> <br />02 <br />03 <br />04 <br />05 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">print ("I am the CHICKEN MAN");</span> cetak ("Aku adalah MAN AYAM");</span> <br />06 <br />07 <br />08 <br />09 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"> ?></span> ?></span> <br />10 <br />11 <br />12 <br />13 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">...</span> ...</span> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">is effectively identical to:</span> secara efektif identik dengan:</span> <br />14 <br />15 <br />16 <br />17 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><?php print ("I am the CHICKEN MAN"); ?></span> <Cetak php ("? Akulah MAN AYAM");?></span> <br /> <br />Like more complicated HTML, it behooves you to use white space and tabs in your code to make the code more understandable. Seperti HTML lebih rumit, itu behooves Anda untuk menggunakan spasi dan tab dalam kode Anda untuk membuat kode lebih dimengerti. <br /> <br />Ready to write your first script? Siap untuk menulis naskah pertama Anda? Let's go. Mari kita pergi. <br />Your First Script Anda Pertama Script <br /> <br />OK, so write your first script already! OK, jadi menulis naskah pertama Anda sudah! Copy the following script, but put whatever you want inside the quotation marks. Salin script berikut, tetapi menempatkan apapun yang Anda inginkan dalam tanda kutip. “Print” here means print to the screen of a web browser when you open the file: "Print" di sini berarti mencetak ke layar web browser saat Anda membuka file: <br />view source <br />print? <br />01 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><html></span> <html></span> <br />02 <br />03 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><body></span> <body></span> <br />04 <br />05 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><?php</span> <? Php</span> <br />06 <br />07 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">print ("I am the CHICKEN MAN");</span> cetak ("Aku adalah MAN AYAM");</span> <br />08 <br />09 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"> ?></span> ?></span> <br />10 <br />11 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"></body></span> </ Body></span> <br />12 <br />13 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"></html></span> </ Html></span> <br /> <br />Save the file with any name that has no spaces and ends in .php, and if you've installed a server on your own machine, you need to save the script somewhere inside the server's root folder (on Windows this is typically in the “wwwroot” directory inside the “inetpub” directory on your C: drive). Simpan file dengan nama yang tidak memiliki ruang dan berakhir di php,. Dan jika Anda telah menginstal server pada komputer Anda sendiri, Anda harus menyimpan naskah di suatu tempat di dalam folder root server (pada Windows ini biasanya dalam " wwwroot "di dalam direktori Inetpub" "direktori pada drive C:). <br /> <br />The next step is to open the file in your browser. Langkah berikutnya adalah membuka file dalam browser Anda. Since you need the server to run your PHP code, you have to open the file through a URL that finds the correct file through your web server. Karena Anda perlu server untuk menjalankan kode PHP, Anda harus membuka file melalui URL yang menemukan file yang benar melalui server web Anda. On Windows, your computer name is your root URL. Pada Windows, nama komputer Anda adalah root URL. My computer name is “rocketboy,” so to see the contents of my root directory, I type “http://rocketboy” into the Web browser and voila! nama komputer saya adalah "rocketboy," sehingga untuk melihat isi dari direktori root, saya ketik "http://rocketboy" ke dalam browser Web dan voila! I see the contents of my root folder. Saya melihat isi dari folder akar saya. To open the file “chickenman.php” in a directory called “tests” inside the root directory, I'd type “http://rocketboy/tests/chickenman.php” and see my example. Untuk membuka file "chickenman.php" dalam sebuah direktori bernama "uji" di dalam direktori root, aku ketik "http://rocketboy/tests/chickenman.php" dan lihat contoh saya. <br /> <br />If you're testing on a PHP-able web server, FTP your files anywhere on your server and they should work when you open them through the URL. Jika Anda uji pada web server PHP-bisa, file FTP Anda di mana saja pada server Anda dan mereka harus bekerja ketika Anda membuka mereka melalui URL. <br /> <br />Go on now and get your first script working. Pergilah sekarang dan mendapatkan kerja skrip pertama Anda. Then come back and we'll have some fun. Kemudian datang kembali dan kita akan bersenang-senang. Together. Bersama. (If you can't get your first script working, look at our First Script Troubleshooting Guide .) (Jika Anda tidak bisa mendapatkan naskah pertama Anda bekerja, lihatlah kami Pertama Script Panduan Pemecahan Masalah .) <br />Error Messages Pesan Kesalahan <br /> <br />Fun, eh? Fun, eh? Fun if it worked. Menyenangkan jika bekerja. If not — if you had an error in your script — you probably got an error message that looked something like this: Jika tidak - jika Anda mengalami error dalam script Anda - Anda mungkin mendapat pesan kesalahan yang tampak seperti ini: <br />view source <br />print? <br />1 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">Parse error:</span> Kesalahan Parse:</span> <br />2 <br />3 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">parse error in C:Inetpubwwwrootwebmonkey_articletest9.php</span> parsing error pada C: Inetpubwwwrootwebmonkey_articletest9.php</span> <br />4 <br />5 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">on line 12</span> on line 12</span> <br /> <br />Error messages can be very useful and you're bound to run into lots of them. Pesan kesalahan dapat sangat berguna dan Anda pasti bertemu dengan banyak dari mereka. You'll get a message like this for every line in your script that has an error. Anda akan mendapatkan pesan seperti ini untuk setiap baris dalam script Anda yang memiliki kesalahan. For our purposes, all we really need to know is that there is something wrong with our code in line 12 of the document “test9.php,” so let's look at that line and see if we can figure it out (good text editors like BBEdit have a function that lets you jump to any particular line). Untuk tujuan kita, semua kita benar-benar perlu tahu adalah bahwa ada sesuatu yang salah dengan kode kita di baris 12 dari dokumen "test9.php," jadi mari kita lihat pada baris itu dan lihat apakah kita bisa figure it out (editor teks yang baik seperti BBEdit memiliki fungsi yang memungkinkan Anda melompat ke baris tertentu). I always start by looking to see if my basic syntax is correct: did I leave out the closing tag, a line's semicolon, quotation marks? Aku selalu mulai dengan melihat apakah sintaks dasar saya sudah benar: aku meninggalkan tag penutup, tanda titik koma garis's, tanda kutip? <br />A Few More Statements Sebuah Laporan Sedikit Lagi <br /> <br />Let's continue by adding to your test code from the last page to show a couple useful tools. Mari kita lanjutkan dengan menambahkan kode pengujian Anda dari halaman terakhir untuk menunjukkan beberapa alat yang berguna. <br /> <br />In the same code that you wrote before, drop in a couple more statements. Dalam kode yang sama yang Anda tulis sebelumnya, penurunan beberapa laporan lebih. As you see, you can gang up more than one PHP function inside the same opening and closing tags. Seperti yang Anda lihat, Anda dapat bersekongkol lebih dari satu fungsi PHP dalam pembukaan yang sama dan tag penutup. My comments in the code explain what each part does: Komentar-komentar saya dalam kode menjelaskan apa yang masing-masing bagian tidak: <br />view source <br />print? <br />1 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><html> <body> This text right here (or any HTML I want to write) will show up just before the PHP code stuff. <p> <?php // first, this $PHP_SELF thang is // an environment variable that'll show the // path from your root folder to this // document itself, like /webmonkey_article/test3.php. // I put this in just for fun. // NOTE: This may only work if your server is Apache. print "$PHP_SELF"; // next we have to "print" any // HTML code we want the browser // to follow to determine // the layout of the results page. // In this case, we're adding a <p> tag // the <p> tags could have been put // inside the same print statement as the // "I am the CHICKEN MAN" text. // between the $PHP_SELF text and the // next bunch of stuff. print ("<p>"); print ("I am the CHICKEN MAN"); print ("<p>"); /* This next "phpinfo" business outputs a long page that tells you exactly how your version of PHP is configured. This can be useful when troubleshooting problems down the road */ phpinfo(); ?> </p> </body> </html></span> <html> <body> teks ini di sini (atau HTML Aku ingin menulis) akan muncul tepat sebelum barang kode PHP. <<p> /? php / pertama, $ PHP_SELF ini thang adalah / / sebuah variabel lingkungan yang 'll menampilkan / / path dari folder root untuk ini / / dokumen itu sendiri, seperti / webmonkey_article/test3.php. / / Aku meletakkan ini hanya untuk bersenang-senang:. / / CATATAN ini hanya dapat bekerja jika server anda Apache. print "$ PHP_SELF"; / / depan kami harus "mencetak" apapun / / kode HTML kita ingin agar browser / / untuk ikut menentukan / / tata letak halaman hasil. / / Dalam hal ini, kami menambahkan tag <p> / / tag <p> bisa saja menempatkan / / dalam laporan cetak sama dengan / / "Akulah MAN AYAM" teks. / / antara teks $ PHP_SELF dan / / hal bunch berikutnya (. print "<p>"); cetak ("Akulah MAN AYAM"); cetak ("<p>"); / * ini berikutnya "phpinfo" keluaran bisnis halaman yang memberitahu Anda tepat bagaimana versi Anda PHP dikonfigurasi;. Hal ini dapat berguna saat troubleshooting masalah di jalan * / phpinfo ()?> </ p> </ body> </ html></span> <br /> <br />NOTE: Phpinfo will output a long page of info about your version of PHP. CATATAN: phpinfo akan menampilkan halaman info tentang versi PHP. You don't need to understand what it all means, I just wanted to show you that it's there if you ever need it. Anda tidak perlu memahami apa arti semua ini, saya hanya ingin menunjukkan bahwa itu ada jika Anda pernah membutuhkannya. <br /> <br /> <br />Very Able Variables Sangat Mampu Variabel <br /> <br />So far, all we've done is have a PHP script print some text. Sejauh ini, semua kami lakukan adalah memiliki script PHP mencetak teks. Big whoop. Big berisik. Let's get down and dirty now with variables. Mari kita turun dan kotor sekarang dengan variabel. A variable is a container for holding one or more values. Variabel adalah wadah untuk menyimpan satu atau lebih nilai. It is the means by which PHP stores information and passes it along between documents and functions and such. Ini adalah cara yang PHP menyimpan informasi dan dibagikan bersama antara dokumen dan fungsi dan semacamnya. You may remember variables from algebra — in the equation “x + 2 = 8″, x is a variable with the value 6. Anda mungkin ingat variabel dari aljabar - dalam persamaan "x + 2 = 8", x adalah variabel dengan nilai 6. <br /> <br />The reason why variables are so important to PHP is that the very notion of having dynamic web pages — pages which respond somehow to user input — relies on data being passed around between pages (or parts of a page). Alasan mengapa variabel begitu penting untuk PHP adalah bahwa gagasan tentang memiliki halaman web dinamis - halaman yang entah bagaimana merespon input pengguna - bergantung pada data yang lewat di antara halaman (atau bagian dari sebuah halaman). Variables are the main mechanism for transferring data like this. Variabel merupakan mekanisme utama untuk mentransfer data seperti ini. <br /> <br />I think the easiest way to explain how variables work in PHP is to show them in action. Saya pikir cara termudah untuk menjelaskan bagaimana variabel bekerja di PHP adalah untuk menunjukkan mereka dalam tindakan. There are three basic things you can do with variables: Ada tiga hal dasar yang dapat Anda lakukan dengan variabel: <br /> <br /> 1. Set them (give them one or more values); Set mereka (memberi mereka satu atau lebih nilai); <br /> 2. Re-set them if they were set before; Re-set mereka jika mereka diatur sebelum; <br /> 3. Access them (read the value of a variable and then do something useful with it). Akses mereka (membaca nilai dari variabel dan kemudian melakukan sesuatu yang berguna dengan itu). <br /> <br />Variables in PHP start with a dollar sign (“$”). Variabel dalam PHP dimulai dengan tanda dolar ("$"). Below I am setting a variable, using it, then setting and using it again. Di bawah ini saya pengaturan variabel, menggunakannya, maka pengaturan dan menggunakannya lagi. The value that a variable holds can be changed any time at all. Nilai yang memegang variabel dapat diubah kapan saja sama sekali. <br />view source <br />print? <br />01 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">1.</span> 1.</span> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><?php</span> <? Php</span> <br />02 <br />03 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">2.</span> 2.</span> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">$utterance = "I love you!";</span> ucapan $ = "Aku cinta padamu!";</span> <br />04 <br />05 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">3.</span> 3.</span> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">print ("When I'm happy, I want to say $utterance");</span> cetak ("Kalau aku bahagia, aku ingin mengatakan $ ucapan");</span> <br />06 <br />07 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">4.</span> 4.</span> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">print ("<p>");</span> cetak ("<p>");</span> <br />08 <br />09 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">5.</span> 5.</span> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">$utterance = "I will smite you!";</span> ucapan $ = "Aku akan membuat Anda!";</span> <br />10 <br />11 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">6.</span> 6.</span> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">print ("When I'm angry, I want to say $utterance");</span> cetak ("Kalau aku marah, aku ingin mengatakan $ ucapan");</span> <br />12 <br />13 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">7. ?></span> 7?>.</span> <br /> <br />Here's what that page will look like: Inilah yang halaman tersebut akan terlihat seperti: <br /> <br />PHP_Tutorial_utterance.gif <br /> <br />In line two I have created a variable that I decided to name “utterance.” All variables start with “$”, so my variable is written “$utterance” in the code. Sejalan dua saya telah membuat sebuah variabel yang saya memutuskan untuk nama "ucapan" Semua variabel dimulai dengan "$"., Sehingga variabel saya ditulis "$ ucapan" dalam kode. Here's how that last code snippet breaks down line by line. Berikut adalah cara yang melanggar terakhir potongan kode ke bawah baris demi baris. Please note: the webserver does the PHP interpreting before sending the browser finished HTML code. Harap diperhatikan: webserver, apakah PHP menafsirkan sebelum mengirim browser selesai kode HTML. <br /> <br /> * Line 1 tells the webserver: “Start PHP code here”. Line 1 memberitahu webserver: "Kode PHP mulai di sini". <br /> <br /> * Line 2 creates the variable $utterance and also sets it, giving it the initial value of “I love you!”. Jalur 2 menciptakan variabel $ ucapan dan juga set itu, memberikan nilai awal "Aku cinta padamu!". <br /> <br /> * Line 3 prints a phrase that draws on the variable $utterance. Line 3 cetak kalimat yang menarik pada variabel $ ucapan. <br /> <br /> * Line 4 creates a Line 4 membuat <br /> <br /> tag in HTML to put vertical space between the two utterances. tag dalam HTML untuk menempatkan spasi vertikal antara dua ucapan-ucapan. <br /> <br /> * Line 5 RE-SETS the variable $utterance and gives it the value “I will smite you!”. Baris 5 RE-set variabel $ ucapan dan memberikan nilai "Aku akan membuat Anda!". <br /> <br /> * Line 6 prints a new phrase that draws on the new meaning of the variable $utterance. Line 6 cetak kalimat baru yang menarik pada makna baru dari $ variabel ucapan. <br /> <br /> * Line 7 tells Mr. Webserver: PHP code ends here. Line 7 mengatakan Mr Webserver: kode PHP berakhir di sini. <br /> <br />See how the variable $utterance is used as a sort of container that can hold different values? Lihat bagaimana variabel $ ucapan digunakan sebagai semacam wadah yang dapat menampung nilai yang berbeda? We just set and then called variables inside the same script, but the power of PHP is that you can set a variable in one place — say from a form that a user fills out — and then use that variable later. Kami hanya menetapkan dan kemudian disebut variabel dalam script yang sama, namun kekuatan PHP adalah bahwa Anda dapat mengatur variabel dalam satu tempat - katakan dari bentuk yang user mengisi - dan kemudian menggunakan variabel kemudian. <br /> <br />The syntax of setting a variable is to: Sintaks dari pengaturan variabel adalah: <br /> <br /> * define it with the = sign ($utterance = “I love you!”;); mendefinisikan dengan tanda = ($ ucapan = "Aku cinta kamu !";); <br /> <br /> * use quotation marks if you're defining it with a string of letters (“I love you!”; numbers don't require quotes); tanda kutip digunakan jika Anda mendefinisikan string dengan huruf ("Aku mencintaimu";! angka tidak memerlukan tanda kutip); <br /> <br /> * end each instruction with a semicolon. setiap akhir instruksi dengan titik koma. <br /> <br />Then you call it by refering to the variable name ($utterance in lines 3 and 6 — notice no quotation marks there). Kemudian Anda menyebutnya dengan mengacu pada nama variabel ($ tuturan dalam baris 3 dan 6 - perhatikan tidak ada tanda kutip di sana). <br /> <br /> <br />Naming Variables Penamaan Variabel <br /> <br />You can name a variable anything you want so long as it follows these rules: Anda dapat nama variabel apa saja yang Anda inginkan asalkan aturan berikut ini: <br /> <br /> * it starts with a letter; dimulai dengan huruf a; <br /> <br /> * it is made up of letters, numbers, and the underscore character (that's the _ character, as in “$baby_names”); itu terdiri dari huruf, angka, dan karakter garis bawah (yang karakter _, seperti pada "$ baby_names"); <br /> <br /> * it isn't used elsewhere (like “print”). tidak digunakan di tempat lain (seperti "cetak"). <br /> <br />Warning: Variable names are case-sensitive, so $baby_names and $Baby_names are not the same. Peringatan: Nama-nama variabel adalah case-sensitive, sehingga $ baby_names dan $ Baby_names tidak sama. You also should try to make your names have some meaning so that you can still make sense of your code next year. Anda juga harus mencoba untuk membuat nama Anda memiliki beberapa makna sehingga Anda masih bisa memahami kode Anda tahun depan. <br /> <br />In the examples so far, we have set variables as chunks of text, which are known as “strings.” Variables can also hold the values of numbers and some other things as well (objects, arrays, booleans). Dalam contoh sejauh ini, kami telah menetapkan variabel sebagai potongan teks, yang dikenal sebagai "string" Variabel. Juga dapat memegang nilai-nilai angka dan beberapa hal lain juga (obyek, array, booleans). <br /> <br />Final note: One thing that can be a little confusing when starting to use PHP is the use of quotation marks inside PHP functions. Catatan akhir: Satu hal yang dapat sedikit membingungkan ketika mulai menggunakan PHP adalah penggunaan tanda kutip di dalam fungsi PHP. Use single or double quotes to set off strings (that is, chunks of text), as in: Gunakan tanda kutip tunggal atau ganda untuk menonaktifkan string (yaitu, potongan teks), seperti dalam: <br />view source <br />print? <br />1 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"> print ("I am the CHICKEN MAN");</span> cetak ("Aku adalah MAN AYAM");</span> <br /> <br />This will print the text I am the CHICKEN MAN. Ini akan mencetak teks Akulah MAN AYAM. If you want to display quotation marks as characters in the output of your PHP script, you must escape them with the “” character, which tells PHP not to use the next character as part of the code. Jika Anda ingin menampilkan tanda kutip sebagai karakter dalam hasil script PHP Anda, Anda harus meloloskan diri dari mereka dengan karakter "", yang menceritakan PHP tidak menggunakan karakter berikutnya sebagai bagian dari kode tersebut. So to output the text “I am the CHICKEN MAN” (with quotation marks showing in the result) the code would look like: Jadi untuk keluaran teks "Akulah MAN AYAM" (dengan tanda kutip menunjukkan dalam hasil pencarian) kode tersebut akan terlihat seperti: <br />view source <br />print? <br />1 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"> print (" "I am the CHICKEN MAN"" );</span> cetak ("" Akulah MAN AYAM "");</span> <br /> <br /> <br />HTML Forms and PHP Formulir HTML dan PHP <br /> <br />In our examples so far, we have set variables and then used them all in the same code. variabel Dalam contoh kami sejauh ini, kami telah menetapkan dan kemudian digunakan semuanya dalam kode yang sama. This doesn't make much sense because in those instances, we could have just hard-coded the values instead of using variables. Ini tidak masuk akal karena dalam contoh-contoh, kita bisa saja keras-kode nilai daripada menggunakan variabel. <br /> <br />Let's get some real mileage by creating HTML forms to gather user input, turning that input into variables, and then doing various things with the information that we just collected. Mari kita mendapatkan beberapa kilometer nyata dengan menciptakan bentuk-bentuk HTML untuk mengumpulkan input pengguna, mengubah input yang menjadi variabel, dan kemudian melakukan berbagai hal dengan informasi yang kami hanya dikumpulkan. <br /> <br />No sense in sitting around waiting – let's go ahead and make a Web page that collects your favorite dirty word and displays it on another page that tells you what a pervert you are. Tidak ada gunanya duduk-duduk menunggu - mari kita pergi ke depan dan membuat halaman Web yang mengumpulkan kata-kata kotor favorit Anda dan menampilkannya pada halaman lain yang memberitahu Anda apa yang Anda pervert. All of this gives a page that looks a lot like this . Semua ini memberikan banyak halaman yang terlihat seperti ini . <br /> <br />First, we make the form page, which is regular HTML with a form in it. Pertama, kita membuat halaman form, yang merupakan HTML biasa dengan bentuk di dalamnya. I'm calling mine “badwords_form.html,” but call yours whatever you like. Aku akan menelepon saya "badwords_form.html," tetapi panggilan Anda apa pun yang Anda suka. (If you want a good primer on HTML forms, read Jay's How To Add HTML Forms to Your Site tutorial.) (Jika Anda ingin primer baik pada bentuk HTML, membaca Jay Cara HTML Formulir Tambahkan ke Situs Anda tutorial.) <br />view source <br />print? <br />01 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><html></span> <html></span> <br />02 <br />03 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><head></span> <head></span> <br />04 <br />05 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><title>My Form <Formulir Saya / title></span> <br />06 <br />07 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"></head></span> </ Head></span> <br />08 <br />09 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><body></span> <body></span> <br />10 <br />11 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><form action="bad_words.php" method=post></span> <form action="bad_words.php" method=post></span> <br />12 <br />13 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">My name is:</span> Nama saya adalah:</span> <br />14 <br />15 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><br> <input type="text" name="YourName"></span> <br> <input type="text" name="YourName"></span> <br />16 <br />17 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">My favorite dirty word is:</span> kata kotor favorit saya adalah:</span> <br />18 <br />19 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><br /><input type="text" name="FavoriteWord"></span> <br /> <input type="text" name="FavoriteWord"></span> <br />20 <br />21 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><input type="submit" name="submit" value="That's Right!"></span> <input type="submit" name="submit" value="That's Right!"></span> <br />22 <br />23 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"></form></span> </ Form></span> <br />24 <br />25 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"></body></span> </ Body></span> <br />26 <br />27 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"></html></span> </ Html></span> <br /> <br />This is a regular HTML form. Ini adalah bentuk HTML biasa. The important pieces are as follows: Potongan-potongan penting adalah sebagai berikut: <br /> <br />Line 7: the HTML that reads action="bad_words.php" tells the browser which PHP document will process the results of the form. Line 7: HTML yang membaca action = "bad_words.php" memberitahu browser dokumen PHP yang akan memproses hasil form. That is to say, in a minute you'll create a document called “bad_words.php” which will be the little engine that makes the result page happen. Artinya, sebentar lagi Anda akan menciptakan sebuah dokumen yang disebut "bad_words.php" yang akan menjadi mesin kecil yang membuat halaman hasil terjadi. (We'll get to the method=post part later on.) (Kami akan dengan metode pos bagian = nanti.) <br /> <br />Line 10: input type="text" determines that the form element which we want here is “text” or a text box (we could also have a radio button, check box, etc.); name="YourName" determines that whatever the user types into the text box will become a variable that we have called “YourName.” This is what ties together forms and variables – each form field can set a variable to be used however you want. Baris 10: input type = "text" menentukan bahwa elemen bentuk yang kita inginkan di sini adalah "teks" atau kotak teks (kita juga bisa memiliki tombol radio, kotak centang, dll); nama = "namaAnda" menentukan bahwa apa pun diketik pengguna ke dalam kotak teks akan menjadi sebuah variabel yang kita sebut "namaAnda" Ini adalah apa hubungan bersama-sama bentuk dan variabel - masing-masing bidang dapat mengatur bentuk variabel yang akan digunakan namun Anda inginkan.. <br /> <br />Line 13: here you have another text input that sets a variable called “FavoriteWord” which is the user's favorite dirty word. Line 13: di sini Anda memiliki input teks yang menentukan sebuah variabel yang disebut "FavoriteWord" yang adalah kata favorit kotor pengguna. <br /> <br />Line 16, 17: This code makes a submit button with the text “That's Right!” and ends the form. Line 16, 17: Kode ini membuat sebuah tombol submit dengan teks "Itu Benar" dan berakhir formulir. <br /> <br />So this form will collect the unassuming user's name and favorite bad word, but now what do we do with it? Jadi formulir ini akan mengumpulkan nama pengguna dan kata sederhana yang buruk favorit, tapi sekarang apa yang kita lakukan dengan itu? Let's take the variables she set and echo them back in another context on another page. Mari kita mengambil variabel ia menetapkan dan echo mereka kembali dalam konteks lain pada halaman lain. <br /> <br />On line 7 of the HTML above, we told the form to head on over to bad_words.php once the submit button was hit. On line 7 dari HTML di atas, kita memberitahu formulir untuk kepala di atas untuk bad_words.php sekali tombol submit ditabrak. This is what bad_words.php looks like: Inilah yang bad_words.php terlihat seperti: <br />view source <br />print? <br />01 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">1.</span> 1.</span> <br />02 <br />03 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">2.</span> 2.</span> <br />04 <br />05 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">3.</span> 3.</span> <br />06 <br />07 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">4.</span> 4.</span> <br />08 <br />09 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">5.</span> 5.</span> <br />10 <br />11 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">6.</span> 6.</span> <br />12 <br />13 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">7.</span> 7.</span> <br />14 <br />15 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">8.</span> 8.</span> <br />16 <br />17 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">9.</span> 9.</span> <br />18 <br />19 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">10.</span> 10.</span> <br />20 <br />21 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">11.</span> 11.</span> <br />22 <br />23 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">12.</span> 12.</span> <br />24 <br />25 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">13.</span> 13.</span> <br />26 <br />27 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">14.</span> 14.</span> <br />28 <br />29 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">15.</span> 15.</span> <br />30 <br />31 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">16.</span> 16.</span> <br />32 <br />33 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">17.</span> 17.</span> <br />34 <br />35 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">18.</span> 18.</span> <br />36 <br />37 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">19.</span> 19.</span> <br />38 <br />39 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">20.</span> 20.</span> <br />40 <br />41 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">21.</span> 21.</span> <br />42 <br />43 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">22.</span> 22.</span> <br />44 <br />45 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">23.</span> 23.</span> <br />46 <br />47 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">24.</span> 24.</span> <br />48 <br />49 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">25.</span> 25.</span> <br />50 <br />51 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">26.</span> 26.</span> <br />52 <br />53 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">27.</span> 27.</span> <br /> <br />view source <br />print? <br />01 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><html></span> <html></span> <br />02 <br />03 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><head></span> <head></span> <br />04 <br />05 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><title>Perv!
perv </ title></span> <br />06 <br />07 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"></head></span> </ Head></span> <br />08 <br />09 <br />10 <br />11 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><?php</span> <? Php</span> <br />12 <br />13 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">// Capture the values posted to this php program from the text fields</span> / / Ambil nilai diposting ke program ini php dari teks ladang</span> <br />14 <br />15 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">// which were named 'YourName' and 'FavoriteWord' respectively</span> / / Yang bernama 'Yourname' dan 'FavoriteWord' masing-masing</span> <br />16 <br />17 <br />18 <br />19 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">$YourName = $_REQUEST['YourName'] ;</span> _REQUEST Yourname $ = $ ['Yourname'];</span> <br />20 <br />21 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">$FavoriteWord = $_REQUEST['FavoriteWord'] ;</span> _REQUEST FavoriteWord $ = $ ['FavoriteWord'];</span> <br />22 <br />23 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">?></span> ?></span> <br />24 <br />25 <br />26 <br />27 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><body bgcolor="#FFFFFF" text="#000000"></span> <body bgcolor="#FFFFFF" text="#000000"></span> <br />28 <br />29 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><p></span> <p></span> <br />30 <br />31 <br />32 <br />33 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">Hi <?php print $YourName; ?></span> Hi <? Cetak php $ Yourname;?></span> <br />34 <br />35 <br />36 <br />37 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><p></span> <p></span> <br />38 <br />39 <br />40 <br />41 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">You like the word <b> <?php print $FavoriteWord; ?>!?!</b></span> Anda menyukai kata <b> cetak php $ FavoriteWord?; ?>!?!</ B></span> <br />42 <br />43 <br />44 <br />45 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><p>You oughta be ashamed of yourself!</span> <p> Kau seharusnya malu pada dirimu sendiri!</span> <br />46 <br />47 <br />48 <br />49 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"></body></span> </ Body></span> <br />50 <br />51 <br />52 <br />53 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"></html></span> </ Html></span> <br /> <br />See how this form passed a variable along from the form page to the PHP file? Lihat bagaimana formulir ini melewati sepanjang variabel dari halaman form ke file PHP? You have not seen the last of this. Anda belum melihat terakhir ini. <br /> <br /> <br />Get versus Post Dapatkan versus Post <br /> <br />So far, we've used the “Post” method of passing form data as opposed to the other method, “Get.” This is the part of the form code that reads form action="bad_words.php" method=post¢ . Sejauh ini, kita telah menggunakan "Post" metode lewat data formulir yang bertentangan dengan metode lainnya, "Get ¢." Ini adalah bentuk bagian dari kode yang membentuk membaca action = "bad_words.php" post = metode. <br /> <br />The difference between these two is that the “post” method transparently passes along all the information the page has gathered, whereas the “get” method will pass all that info along as part of the URL (in the form above, this would look like: http://rocketboy/webmonkey_article/bad_words.php?YourName=bob&FavoriteWord=crikey%21&submit=Enter+My+Data%21 – see how the info the user entered about his name and his favorite word get added to the URL?) Perbedaan antara kedua adalah bahwa posting "" metode transparan melewati sepanjang semua informasi halaman telah berkumpul, sedangkan metode "get" akan lulus semua info yang bersama sebagai bagian dari URL (dalam bentuk di atas, ini akan terlihat seperti : http://rocketboy/webmonkey_article/bad_words.php?YourName=bob&FavoriteWord=crikey% 21 & submit = Masukkan + Saya +% Data 21 - lihat bagaimana info tentang pengguna memasukkan nama dan kata favoritnya akan ditambahkan ke URL?) <br />Arrays Array <br /> <br />One of your best tools now that you've mastered variables – you have, haven't you? Salah satu alat terbaik Anda sekarang variabel yang Anda telah menguasai - yang Anda miliki, bukan? – are arrays. - Adalah array. <br /> <br />Arrays give you the ability to store not just one value inside a variable, but a whole bunch of values in a single variable. Array memberi Anda kemampuan untuk menyimpan tidak hanya satu nilai dalam variabel, tetapi sejumlah besar nilai dalam sebuah variabel tunggal. <br /> <br />If I wanted to catalog all of the animals in my house, I could set each one as a regular variable. Jika aku ingin katalog semua binatang di rumah saya, saya bisa mengatur masing-masing sebagai variabel biasa. I've got two dogs, Phoebe and Ruby, and a squirrel that died in the attic last year, whom we'll call Rotty. Aku punya dua anjing, Phoebe dan Ruby, dan tupai yang mati di loteng tahun lalu, yang kita sebut Rotty. Setting each one as a variable looks like this: Pengaturan masing-masing sebagai variabel terlihat seperti ini: <br />view source <br />print? <br />1 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">$dog1 = "Phoebe";</span> $ Dog1 = "Phoebe";</span> <br />2 <br />3 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">$dog2 = "Ruby";</span> $ Dog2 = "Ruby";</span> <br />4 <br />5 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">$squirrel1 = "Rotty";</span> $ Squirrel1 = "Rotty";</span> <br /> <br />But an array will let us store all these inside one single variable, which I'll call $critters. Tapi array akan membiarkan kita menyimpan semua ini dalam satu variabel tunggal, yang saya akan menelepon $ makhluk. Each element of the variable has its own “key” that is used to access that part of the array, which can either be a string of letters or numbers. Setiap elemen variabel memiliki sendiri "kunci" yang digunakan untuk mengakses bagian array, yang dapat berupa string dari huruf atau angka. <br /> <br />Let me explain the “key” concept another way: If we're storing three different values inside one variable (like storing Phoebe, Ruby, and Rotty inside $critters), we need some way to be able to suck out any individual part of the array to use it. Biarkan saya menjelaskan "kunci" konsep cara lain: Jika kita menyimpan tiga nilai yang berbeda dalam satu variabel (seperti menyimpan Phoebe, Ruby, dan Rotty dalam $ makhluk), kita perlu beberapa cara untuk dapat menghisap bagian individual array untuk menggunakannya. An array will automatically number each element that comprises it, so the key can be element 1, element 2, and element 3. Sebuah array secara otomatis akan ke setiap elemen yang terdiri dari itu, sehingga kunci dapat elemen 1, elemen 2 dan elemen 3. Or, as we'll see later on, we can name each part of the array with text. Atau, seperti yang akan kita lihat nanti, kita bisa setiap nama bagian dari array dengan teks. In this case I could make the keys “fat dog,” “skinny dog,” and “squirrel” and use those to identify each array member. Dalam hal ini aku bisa membuat kunci "anjing gemuk," "anjing kurus," dan "tupai" dan menggunakan mereka untuk mengidentifikasi setiap anggota array. <br /> <br />Let's make a simple array and then use it. Mari kita membuat array sederhana dan kemudian menggunakannya. The easiest way to create an array is to use the array() function, which assigns a bunch of values to your array at once and looks like this: Cara termudah untuk membuat array adalah dengan menggunakan array () fungsi, yang memberikan banyak nilai-nilai ke array Anda sekaligus dan tampak seperti ini: <br />view source <br />print? <br />1 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"> $critters = array ( "Phoebe", "Ruby", "Rotty" );</span> makhluk $ = array ("Phoebe", "Ruby", "Rotty");</span> <br /> <br />This stores all my animal names into one variable ($critters) in an array, and automatically assigns a numbered “key” to each element starting in order and giving the first element the number 0. Ini menyimpan semua nama hewan saya ke dalam satu variabel ($ makhluk) dalam array, dan secara otomatis memberikan sebuah nomor "kunci" untuk setiap elemen dimulai dalam rangka dan memberikan elemen pertama angka 0. So Phoebe is element [0], Ruby is [1], Rotty is [2], etc. I make up the name of the array myself (here it's $critters). Jadi Phoebe adalah elemen [0], Ruby adalah [1], Rotty adalah [2], dll saya membuat nama array sendiri (di sini it's $ makhluk). <br /> <br />You can now get at any of the array elements by referring to the variable followed by the element number in square brackets: $critters[0], for example. Anda sekarang bisa mendapatkan setiap elemen array dengan mengacu pada variabel diikuti dengan nomor elemen dalam tanda kurung siku: $ makhluk [0 misalnya,]. Here it is in action: Di sini adalah dalam tindakan: <br />view source <br />print? <br />1 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><?php</span> <? Php</span> <br />2 <br />3 <br />4 <br />5 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">print "$critters[2]";</span> print "$ makhluk [2]";</span> <br />6 <br />7 <br />8 <br />9 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"> ?></span> ?></span> <br /> <br />This will simply print the third element in the array, which is Rotty (don't forget that array numbers start at 0, so $critters[2] is third after $critters[0] and $critters[1]). Ini hanya akan mencetak elemen ketiga dalam array, yang Rotty (jangan lupa bahwa nomor array dimulai dari 0, sehingga $ makhluk [2] adalah ketiga setelah $ makhluk [0] dan $ makhluk [1]). <br /> <br />There's another way to set an array, or even to add to an existing array, by setting each element individually: Ada cara lain untuk mengatur sebuah array, atau bahkan untuk menambahkan ke array yang ada, dengan menetapkan setiap elemen secara individu: <br />view source <br />print? <br />1 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"> $critters[] = "Phoebe";</span> $ Makhluk [] = "Phoebe";</span> <br />2 <br />3 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">$critters[] = "Ruby";</span> $ Makhluk [] = "Ruby";</span> <br />4 <br />5 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">$critters[] = "Rotty";</span> $ Makhluk [] = "Rotty";</span> <br /> <br />This'll have the same effect as using the array() function, giving the first element the key [0] and so on. Ini akan memiliki efek yang sama seperti menggunakan array () fungsi, memberikan elemen pertama tombol [0] dan seterusnya. But wait! Tapi tunggu! I forgot about Opie the cat. Aku lupa tentang Opie kucing. Hmmm. Hmmm. Regardless of how we made the array in the first place, I can easily add Opie like this: Terlepas dari bagaimana kita membuat array di tempat pertama, saya dapat dengan mudah menambahkan Opie seperti ini: <br />view source <br />print? <br />1 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"> $critters[] = "Opie";</span> $ Makhluk [] = "Opie";</span> <br /> <br />PHP is smart enough to count the number of elements and give Opie the next available one, which in this case (after Phoebe, Ruby, and Rotty) is [3]. PHP cukup pintar untuk menghitung jumlah elemen dan memberikan Opie berikutnya tersedia, yang dalam hal ini (setelah Phoebe, Ruby, dan Rotty) adalah [3]. <br /> <br />To recap this concept, I can set an array to include the animals in my house either this way: Untuk rekap konsep ini, saya dapat mengatur array untuk memasukkan hewan-hewan di rumah saya baik seperti ini: <br />view source <br />print? <br />1 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"> $critters[] = "Phoebe";</span> $ Makhluk [] = "Phoebe";</span> <br />2 <br />3 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">$critters[] = "Ruby";</span> $ Makhluk [] = "Ruby";</span> <br />4 <br />5 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">$critters[] = "Rotty";</span> $ Makhluk [] = "Rotty";</span> <br />6 <br />7 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">$critters[] = "Opie";</span> $ Makhluk [] = "Opie";</span> <br /> <br />Or this way: Atau seperti ini: <br />view source <br />print? <br />1 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"> $critters = array ( "Phoebe", "Ruby", "Rotty", "Opie" );</span> makhluk $ = array ("Phoebe", "Ruby", "Rotty", "Opie");</span> <br /> <br />Both will be indexed in the computer brain with the values: Keduanya akan diindeks di otak komputer dengan nilai-nilai: <br />view source <br />print? <br />1 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"> $critters[0] = "Phoebe";</span> $ Makhluk [0] = "Phoebe";</span> <br />2 <br />3 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">$critters[1] = "Ruby";</span> $ Makhluk [1] = "Ruby";</span> <br />4 <br />5 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">$critters[2] = "Rotty";</span> $ Makhluk [2] = "Rotty";</span> <br />6 <br />7 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">$critters[3] = "Opie";</span> $ Makhluk [3] = "Opie";</span> <br /> <br />And in both cases, you could get at any element in the array by describing its number … Dan dalam kedua kasus, Anda bisa mendapatkan setiap elemen dalam array dengan menjelaskan nomor yang ... <br />view source <br />print? <br />1 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"> <?php</span> <? Php</span> <br />2 <br />3 <br />4 <br />5 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">print "$critters[3]";</span> print "$ makhluk [3]";</span> <br />6 <br />7 <br />8 <br />9 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"> ?></span> ?></span> <br /> <br />… which would print the string Opie to the window of your browser. ... Yang akan mencetak string Opie ke jendela browser Anda. <br /> <br />Arrays can be made to do all kinds of things, like being incremented by number, sorted in alphabetical order, printed by different types of categorization, and many more. Array dapat dibuat untuk melakukan segala macam hal, seperti menjadi bertambah dengan nomor, diurutkan dalam urutan abjad, yang dicetak oleh berbagai jenis kategorisasi, dan banyak lagi. <br /> <br /> <br />Associative Arrays Array asosiatif <br /> <br />Ready to get more complicated? Siap untuk mendapatkan lebih rumit? The associative array indexes the contained elements not by numbers, but by names that you determine. Indeks array asosiatif unsur-unsur yang terkandung tidak dengan angka, tetapi dengan nama yang Anda menentukan. Inside the array() function, you set up pairs where you name the key and its value using the combo of the “=” and the “>”, like: key=>”value”. Di dalam array () fungsi, Anda menetapkan pasangan mana Anda nama kunci dan nilai dengan menggunakan combo dari "=" dan ">", seperti: kunci => "nilai". Here's what it looks like in action: Inilah yang tampaknya dalam tindakan: <br />view source <br />print? <br />01 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"> $PhoebeDog = array (</span> $ PhoebeDog = array (</span> <br />02 <br />03 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">name=>"Phoebe",</span> nama => "Phoebe",</span> <br />04 <br />05 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">description=>"fat dog",</span> deskripsi => anjing "gemuk",</span> <br />06 <br />07 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">color=>"grey and white",</span> warna => "" abu-abu dan putih,</span> <br />08 <br />09 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">age=>7</span> umur => 7</span> <br />10 <br />11 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">);</span> );</span> <br /> <br />Here we're telling the array to create the keys “name,” “description,” “color,” and “age”; and we give each of those keys a value (name is “Phoebe”, description is “fat dog,” and so on). Di sini kita mengatakan array untuk membuat tombol "nama," "deskripsi," "warna," dan "usia"; dan kami masing-masing memberi nilai kunci (nama adalah "Phoebe", deskripsi adalah "anjing lemak, "dan seterusnya). <br /> <br />We can get at any part of the array through the “key” names that we set, for example: Kami bisa mendapatkan di bagian manapun dari array melalui "kunci" nama yang kita tetapkan, misalnya: <br />view source <br />print? <br />1 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"> print $PhoebeDog[color];</span> print $ PhoebeDog [warna];</span> <br /> <br />will give us grey and white. akan memberi kita abu-abu dan putih. We can also set each key individually, like so: Kami juga dapat mengatur setiap kunci secara individual, seperti: <br />view source <br />print? <br />1 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"> $animals[name] = "Phoebe";</span> $ Hewan [nama] = "Phoebe";</span> <br />2 <br />3 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">$animals[description] = "fat dog";</span> $ Hewan [deskripsi] = "anjing gemuk";</span> <br />4 <br />5 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">$animals[color] = "grey and white";</span> hewan $ [warna] = "abu-abu dan putih";</span> <br />6 <br />7 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">$animals[age] = 7;</span> $ Hewan [umur] 7 =;</span> <br /> <br />Finally, let's make it hurt. Akhirnya, mari kita membuatnya terluka. We're going to get some serious power out of this arrays business by creating a “multi-dimensional” array. Kita akan mendapatkan beberapa kekuatan serius keluar dari bisnis ini array dengan menciptakan sebuah "multi-dimensi" array. A multi-dimensional array is an array (say the animals in my house) that is made up of other arrays (for each animal, an array that contains the critter's name, color, description, and age). Sebuah array multi dimensi adalah array (misalnya binatang di rumah saya) yang terdiri dari array yang lain (untuk hewan masing-masing, sebuah array yang berisi nama makhluk itu, warna, deskripsi, dan umur). <br /> <br />We make multi-dimensional arrays by creating one array: Kita membuat array multi dimensi dengan membuat satu array: <br />view source <br />print? <br />1 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"> $animals = array</span> $ hewan = array</span> <br />2 <br />3 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">(</span> (</span> <br />4 <br />5 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">);</span> );</span> <br /> <br />…and then we fill that array with an array of animals in which we've defined the keys, like this: ... Dan kemudian kita isi array tersebut dengan array hewan di mana kita telah menetapkan tombol, seperti ini: <br />view source <br />print? <br />01 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"> $animals = array (</span> $ hewan = array (</span> <br />02 <br />03 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">array ( name=>"Phoebe",</span> array (nama => "Phoebe",</span> <br />04 <br />05 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">type=>"dog",</span> type => "anjing",</span> <br />06 <br />07 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">color=>"grey and white",</span> warna => "" abu-abu dan putih,</span> <br />08 <br />09 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">age=>7 ),</span> umur => 7),</span> <br />10 <br />11 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">array ( name=>"Ruby",</span> array (nama => "Ruby",</span> <br />12 <br />13 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">type=>"dog",</span> type => "anjing",</span> <br />14 <br />15 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">color=>"brown and white",</span> warna => "" cokelat dan putih,</span> <br />16 <br />17 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">age=>7 ),</span> umur => 7),</span> <br />18 <br />19 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">array ( name=>"Rotty",</span> array (nama => "Rotty",</span> <br />20 <br />21 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">type=>"squirrel",</span> type => "tupai",</span> <br />22 <br />23 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">color=>"grey",</span> warna => "abu-abu",</span> <br />24 <br />25 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">age=>2 ),</span> umur => 2),</span> <br />26 <br />27 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">array ( name=>"Opie",</span> array (nama => "Opie",</span> <br />28 <br />29 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">type=>"cat",</span> type => "kucing",</span> <br />30 <br />31 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">color=>"grey tabby",</span> warna => "abu-abu kucing",</span> <br />32 <br />33 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">age=>5 )</span> umur => 5)</span> <br />34 <br />35 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">);</span> );</span> <br /> <br />To use this now, we can get any part of the information contained in there by naming the overall array ($animals), naming the number of the sub-array that we want to find out about (Phoebe is [0], Ruby is [1], etc.) and then naming the key for the attribute we want to get at (name, type, color, or age). Untuk menggunakan ini sekarang, kita bisa mendapatkan bagian manapun dari informasi yang terdapat di sana dengan menyebutkan keseluruhan array ($ hewan), penamaan jumlah sub-array yang kita ingin mencari tahu tentang (Phoebe adalah [0], Ruby [1], dll) dan kemudian penamaan tombol untuk atribut yang kita ingin mendapatkan di (nama, jenis, warna, atau usia). <br /> <br />To find out the age of the cat, we'd write: Untuk mengetahui usia kucing, kita akan menulis: <br />view source <br />print? <br />1 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">print $animals[3][age];</span> print $ hewan [3] [umur];</span> <br /> <br />Here's what it all looks like together. Inilah yang semuanya tampak seperti sama. This is all in one page, but remember that you can set arrays in one place (in code or in form fields from another page or in a database, say) and get at the info contained within from somewhere else. Ini semua dalam satu halaman, tapi ingat bahwa anda dapat mengatur susunan dalam satu tempat (dalam kode atau dalam bentuk bidang dari halaman lain atau dalam database, misalnya) dan mendapatkan info yang terkandung di dalam dari tempat lain. Here I'm putting it all together on one page so you can see it all at once. Di sini aku meletakkan semua bersama-sama pada satu halaman sehingga Anda dapat melihat semuanya sekaligus. <br />view source <br />print? <br />01 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><html></span> <html></span> <br />02 <br />03 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><head></span> <head></span> <br />04 <br />05 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><title>Pet Arrays
Pet Array </ title></span> <br />06 <br />07 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"></head></span> </ Head></span> <br />08 <br />09 <br />10 <br />11 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><body></span> <body></span> <br />12 <br />13 <br />14 <br />15 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><?php</span> <? Php</span> <br />16 <br />17 <br />18 <br />19 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">$animals = array (</span> $ hewan = array (</span> <br />20 <br />21 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">array ( name => "Phoebe",</span> array (nama => "Phoebe",</span> <br />22 <br />23 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">type => "dog",</span> type => "anjing",</span> <br />24 <br />25 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">color => "grey and white",</span> warna => "" abu-abu dan putih,</span> <br />26 <br />27 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">age => 7 ),</span> umur => 7),</span> <br />28 <br />29 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">array ( name => "Ruby",</span> array (nama => "Ruby",</span> <br />30 <br />31 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">type => "dog",</span> type => "anjing",</span> <br />32 <br />33 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">color => "brown and white",</span> warna => "" cokelat dan putih,</span> <br />34 <br />35 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">age =>7 ),</span> umur => 7),</span> <br />36 <br />37 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">array ( name => "Rotty",</span> array (nama => "Rotty",</span> <br />38 <br />39 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">type => "squirrel",</span> type => "tupai",</span> <br />40 <br />41 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">color => "grey",</span> warna => "abu-abu",</span> <br />42 <br />43 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">age =>2 ),</span> umur => 2),</span> <br />44 <br />45 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">array ( name => "Opie",</span> array (nama => "Opie",</span> <br />46 <br />47 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">type => "cat",</span> type => "kucing",</span> <br />48 <br />49 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">color => "grey tabby",</span> warna => "abu-abu kucing",</span> <br />50 <br />51 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">age => 5 )</span> umur => 5)</span> <br />52 <br />53 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">);</span> );</span> <br />54 <br />55 <br />56 <br />57 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">print $animals[2]["type"];</span> print $ hewan [2] ["tipe"];</span> <br />58 <br />59 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">print ("<br>");</span> cetak ("<br>");</span> <br />60 <br />61 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">print $animals[3]["color"];</span> print $ hewan [3] ["warna"];</span> <br />62 <br />63 <br />64 <br />65 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">?></span> ?></span> <br />66 <br />67 <br />68 <br />69 <br />70 <br />71 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"></body></html></span> </ Body> </ html></span> <br /> <br />What we've just done is create an array that includes a sub-array for each animal which contains detailed info about that critter; then we print a sentence that uses the type and ages of two of the animals. Apa yang kita baru saja dilakukan adalah membuat sebuah array yang mencakup sub-array untuk setiap hewan yang berisi informasi rinci tentang makhluk itu; maka kita mencetak kalimat yang menggunakan jenis dan usia dua binatang. <br />Operators; If, Else, Elseif; Loops Operator; Jika, Lain, Elseif; Loops <br /> <br />The whole deal about making dynamic websites is that you want your web page to be as smart as possible — to have code sitting there that can make all sorts of decisions based on different kinds of user input, user conditions (what browser is Visitor X using?), or information that you set yourself. Seluruh kesepakatan tentang membuat website dinamis adalah bahwa Anda ingin halaman web Anda untuk menjadi seperti cerdas mungkin - untuk memiliki kode duduk di sana yang dapat membuat segala macam keputusan berdasarkan berbagai jenis input pengguna, kondisi pengguna (apa browser Pengunjung X menggunakan ),? atau informasi yang Anda tentukan sendiri. Examples of this could be: Contoh ini dapat: <br /> <br /> * After a user enters an email address, check that it has a valid form (whoever@wherever.com) and if not, serve a page that says, “hey pal, how about a VALID email address?” Setelah pengguna memasukkan alamat email, periksa bahwa ia memiliki bentuk yang valid (whoever@wherever.com) dan jika tidak, melayani halaman yang mengatakan, "hey pal, bagaimana dengan alamat email yang Valid?" <br /> <br /> * Serve one set of HTML to .com domains and another to .gov domains (where you try not to use any big words that might confuse 'em). Sajikan satu set dari HTML ke domain com dan lain.. Domain gov (di mana Anda mencoba untuk tidak menggunakan kata-kata besar yang mungkin membingungkan 'em). <br /> <br /> * Know whether a customer at your online store is meeting a minimum dollar amount for an online credit card purchase. Mengetahui apakah pelanggan di toko online Anda adalah rapat jumlah minimum dolar untuk membeli kartu kredit online. <br /> <br /> * And on and on and on – the possibilities are limitless. Dan terus dan terus dan terus - karena kemungkinan tidak terbatas. <br /> <br />If Jika <br />The way to make your pages smart is to use If, Else, and Elseif statements along with Comparison and Logical Operators. Cara untuk membuat halaman Anda cerdas adalah dengan menggunakan Jika, Lain, dan laporan Elseif bersama dengan Perbandingan dan Operator Logika. The most important one of these is the Yang paling penting dari ini adalah <br />view source <br />print? <br />1 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">if</span> jika</span> <br />statement, which gives you the ability to code: pernyataan, yang memberikan Anda kemampuan untuk kode: <br />view source <br />print? <br />1 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"> If some condition is true, then do somesuch thing;</span> Jika beberapa kondisi benar, maka lakukan hal somesuch;</span> <br />2 <br />3 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">If the condition is not true, then ignore it;</span> Jika kondisi ini tidak benar, maka abaikan saja;</span> <br /> <br />The syntax of this statement is as follows: Sintaks dari pernyataan ini adalah sebagai berikut: <br />view source <br />print? <br />1 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"> if (condition) {</span> if (kondisi) (</span> <br />2 <br />3 <br />4 <br />5 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">// code in here to execute if the condition is true</span> / / Code di sini untuk mengeksekusi jika kondisi benar</span> <br />6 <br />7 <br />8 <br />9 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">}</span> )</span> <br /> <br />Here it is in action. Di sini adalah dalam tindakan. First we set the variable Pertama, kita menetapkan variabel <br />view source <br />print? <br />01 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"> <?php</span> <? Php</span> <br />02 <br />03 <br />04 <br />05 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">$FavoriteColor = "blue";</span> $ FavoriteColor = "biru";</span> <br />06 <br />07 <br />08 <br />09 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">if ($FavoriteColor == "blue") {</span> if ($ FavoriteColor == "biru") (</span> <br />10 <br />11 <br />12 <br />13 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">print ("I like blue too!");</span> cetak ("Aku suka warna biru juga");</span> <br />14 <br />15 <br />16 <br />17 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">}</span> )</span> <br />18 <br />19 <br />20 <br />21 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"> ?></span> ?></span> <br /> <br />Please note that: Harap dicatat bahwa: <br />view source <br />print? <br />1 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">if ($FavoriteColor = "blue")</span> if ($ FavoriteColor = "biru")</span> <br /> <br />and dan <br />view source <br />print? <br />1 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">if ($FavoriteColor == "blue")</span> if ($ FavoriteColor == "biru")</span> <br /> <br />are not the same thing, the first will always be true as it sets $FavoriteColor to blue. bukanlah hal yang sama, yang pertama akan selalu benar seperti set $ FavoriteColor menjadi biru. <br />Else Lain <br /> <br />Else builds on the if statement as if to say: Lain dibangun di atas laporan jika seolah berkata: <br />view source <br />print? <br />1 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"> If some condition is true, then do somesuch thing;</span> Jika beberapa kondisi benar, maka lakukan hal somesuch;</span> <br />2 <br />3 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">ELSE, in case that first condition is NOT true, then do this other thing.</span> ELSE, dalam hal bahwa kondisi pertama adalah TIDAK benar, maka melakukan hal lainnya.</span> <br /> <br />It works like this: Cara kerjanya seperti ini: <br />view source <br />print? <br />01 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">if (condition) {</span> if (kondisi) (</span> <br />02 <br />03 <br />04 <br />05 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">// code in here to execute if the condition is true</span> / / Code di sini untuk mengeksekusi jika kondisi benar</span> <br />06 <br />07 <br />08 <br />09 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">} else {</span> ) Else (</span> <br />10 <br />11 <br />12 <br />13 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">// code in here to execute if the condition is not true</span> / / Code di sini untuk mengeksekusi jika kondisi ini tidak benar</span> <br />14 <br />15 <br />16 <br />17 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">}</span> )</span> <br /> <br />Here it is in motion: Di sini adalah dalam gerak: <br />view source <br />print? <br />01 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><?php</span> <? Php</span> <br />02 <br />03 <br />04 <br />05 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">$FavoriteColor = "yellow";</span> $ FavoriteColor = "kuning";</span> <br />06 <br />07 <br />08 <br />09 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">if ($FavoriteColor == "blue") {</span> if ($ FavoriteColor == "biru") (</span> <br />10 <br />11 <br />12 <br />13 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">print ("I like blue too!");</span> cetak ("Aku suka warna biru juga");</span> <br />14 <br />15 <br />16 <br />17 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">} else {</span> ) Else (</span> <br />18 <br />19 <br />20 <br />21 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">print ("You don't like blue?! Crazy fool!");</span> print ("Anda tidak suka warna biru tolol Gila!!?");</span> <br />22 <br />23 <br />24 <br />25 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">}</span> )</span> <br />26 <br />27 <br />28 <br />29 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">?></span> ?></span> <br /> <br />What you see above is the typical format for writing statements like this. Apa yang Anda lihat di atas adalah format umum untuk menulis laporan seperti ini. The key part is to see where the curly braces are so you don't get confused as to which statement belongs to which piece of the code. Bagian utama adalah untuk melihat mana kurung kurawal tersebut sehingga Anda tidak bingung untuk yang pernyataan milik yang potongan kode. Above, the first set of { and } belong to the “if,” the second { and } belong to the “else.” Di atas, set pertama (dan) milik "jika," yang kedua (dan) milik "lain." <br />Elseif Elseif <br /> <br />There's one more sibling in the if, else family, and it's called elseif . Ada satu saudara lebih dalam jika, keluarga lain, dan itu disebut elseif. Where else is sort of a blanket control that make something happen as long as the if statement is not true, elseif makes something happen if a specific condition is met: Di mana lagi adalah semacam kontrol selimut yang membuat sesuatu terjadi selama jika pernyataan tidak benar, elseif membuat sesuatu terjadi jika kondisi tertentu terpenuhi: <br />view source <br />print? <br />1 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">IF some condition is true, then do somesuch thing;</span> JIKA beberapa kondisi benar, maka lakukan hal somesuch;</span> <br />2 <br />3 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">ELSEIF some other specific condition is true, then do another thing;</span> ELSEIF beberapa kondisi spesifik lainnya adalah benar, maka lakukan hal lain;</span> <br /> <br />It looks like this: Ini terlihat seperti ini: <br />view source <br />print? <br />01 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><?php</span> <? Php</span> <br />02 <br />03 <br />04 <br />05 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">$FavoriteColor = "green";</span> $ FavoriteColor = "hijau";</span> <br />06 <br />07 <br />08 <br />09 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">if ($FavoriteColor == "blue") {</span> if ($ FavoriteColor == "biru") (</span> <br />10 <br />11 <br />12 <br />13 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">print ("I like blue too!");</span> cetak ("Aku suka warna biru juga");</span> <br />14 <br />15 <br />16 <br />17 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">} elseif ($FavoriteColor = green) {</span> ) Elseif ($ FavoriteColor = hijau) (</span> <br />18 <br />19 <br />20 <br />21 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">print ("MMMmmmmmmmmmm, green!");</span> cetak ("MMMmmmmmmmmmm, hijau");</span> <br />22 <br />23 <br />24 <br />25 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">}</span> )</span> <br />26 <br />27 <br />28 <br />29 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"> ?></span> ?></span> <br /> <br />You could even add an ELSE statement at the end in case FavoriteColor were neither blue nor green. Anda bahkan bisa menambahkan pernyataan ELSE akhir dalam kasus FavoriteColor itu tidak biru atau hijau. <br />Comparison and Logical Operators Perbandingan dan Operator Logika <br /> <br />We've seen how the “=” sign works when we set variables in the scripts we've written so far (as in the code $FavoriteColor = "blue"; and $utterance = "I will smite you!"; ). Kita telah melihat bagaimana "=" sign bekerja ketika kita mengatur variabel dalam script kita sudah menulis terlalu jauh (seperti dalam kode $ FavoriteColor = "biru"; dan ucapan $ = "Aku akan membuat engkau;!"). The equal sign here is what we call the “assignment operator” and is the simplest operator we've got: $a = b means “the variable a is assigned the value b (for the moment).” Tanda sama di sini adalah apa yang kita sebut operator tugas "" dan merupakan operator paling sederhana yang kita miliki: $ a, b berarti "= variabel adalah diberi nilai b (untuk saat ini)." <br /> <br />But you can squeeze a lot more juice out of your PHP using what are called “comparison operators,” “logical operators,” and “arithmetic operators.” Here's what they are, in tables copied verbatim from PHP.net . Tapi Anda bisa menekan lebih banyak jus out dari PHP dengan menggunakan apa yang disebut "operator perbandingan," "operator logis," dan "operator aritmatika adalah." Inilah apa yang mereka, dalam tabel disalin verbatim dari PHP.net . <br />Comparison Operators Operator Perbandingan <br /> <br />These give you the ability to compare whether elements are equal, identical, less than or greater than one another (with some other variations). Ini memberikan Anda kemampuan untuk membandingkan apakah elemen sama, identik, kurang dari atau lebih besar dari satu sama lain (dengan beberapa variasi lain). <br />Example Contoh Name Nama Result Hasil <br />$a == $b $ A == $ b Equal Sama TRUE if $a is equal to $b. TRUE jika $ a sama dengan $ b. <br />$a === $b $ A === $ b Identical Identik TRUE if $a is equal to $b, and they are of the same type. TRUE jika $ a sama dengan $ b, dan mereka adalah dari jenis yang sama. (PHP 4 only) (PHP 4 saja) <br />$a != $b $ A =! $ B Not equal Tidak sama TRUE if $a is not equal to $b. TRUE jika $ a tidak sama dengan $ b. <br />$a <> $b $ A> <$ b Not equal Tidak sama TRUE if $a is not equal to $b. TRUE jika $ a tidak sama dengan $ b. <br />$a !== $b $ A ==! $ B Not identical Tidak identik TRUE if $a is not equal to $b, or they are not of the same type. TRUE jika $ a tidak sama dengan $ b, atau mereka tidak dari jenis yang sama. (PHP 4 only) (PHP 4 saja) <br />$a < $b $ A $ <b Less than Kurang dari TRUE if $a is strictly less than $b. TRUE jika $ a adalah sangat kurang dari $ b. <br />$a > $b $ A $ b> Greater than Lebih besar dari TRUE if $a is strictly greater than $b. TRUE jika $ a adalah sangat lebih besar dari $ b. <br />$a <= $b $ A <= $ b Less than or equal to Kurang dari atau sama dengan TRUE if $a is less than or equal to $b. TRUE jika $ a kurang dari atau sama dengan $ b. <br />$a >= $b $> A = $ b Greater than or equal to Lebih besar dari atau sama dengan TRUE if $a is greater than or equal to $b. TRUE jika $ a lebih besar dari atau sama dengan $ b. <br />Logical Operators Logical Operator <br /> <br />Here you can compare elements using comparisons and, or, and the like. Di sini Anda dapat membandingkan elemen-elemen dengan menggunakan perbandingan dan, atau, dan sejenisnya. <br />Example Contoh Name Nama Result Hasil <br />$a and $b $ A dan $ b And Dan TRUE if both $a and $b are TRUE . TRUE jika keduanya $ a dan $ b adalah TRUE. <br />$a or $b $ A atau $ b Or Atau TRUE if either $a or $b is TRUE . TRUE jika salah satu $ a atau $ b adalah TRUE. <br />$a xor $b $ XOR a $ b Xor XOR TRUE if either $a or $b is TRUE , but not both. TRUE jika salah satu $ a atau $ b adalah TRUE, tetapi tidak keduanya. <br />! ! $a $ A Not Tidak TRUE if $a is not TRUE . TRUE jika $ a bukan TRUE. <br />$a && $b $ A & & $ b And Dan TRUE if both $a and $b are TRUE . TRUE jika keduanya $ a dan $ b adalah TRUE. <br />$a || $b $ A | | $ b Or Atau TRUE if either $a or $b is TRUE . TRUE jika salah satu $ a atau $ b adalah TRUE. <br />Aritmetic Operators Aritmetic Operator <br /> <br />Just what it says – this is basic math. Hanya apa yang dikatakan - ini adalah matematika dasar. <br />Example Contoh Name Nama Result Hasil <br />$a + $b $ A $ + b Addition Tambahan Sum of $a and $b. Jumlah $ a dan $ b. <br />$a – $b $ A - $ b Subtraction Pengurangan Difference of $a and $b. Selisih dari $ a dan $ b. <br />$a * $b $ * A $ b Multiplication Perkalian Product of $a and $b. Produk dari $ a dan $ b. <br />$a / $b $ A $ / b Division Divisi Quotient of $a and $b. Quotient dari $ a dan $ b. <br />$a % $b $% A $ b Modulus Modulus Remainder of $a divided by $b. Sisa dari $ a dibagi $ b. <br />Loops Loop <br /> <br />Loops are really handy. Loop adalah sangat berguna. They let you program your code to repeat itself (and also to figure out how many times to run through itself before it's done). Mereka membiarkan kode program Anda untuk mengulang sendiri (dan juga untuk mengetahui berapa kali menjalankan melalui dirinya sendiri sebelum selesai). Loops have instructions to “keep running this piece of code over and over again until certain conditions are met.” You can use more than one kind of loop. Loop memiliki instruksi untuk "tetap menjalankan potongan kode ini berulang-ulang sampai kondisi tertentu terpenuhi." Anda dapat menggunakan lebih dari satu jenis loop. Let's look at the most basic kind, the “while” loop. Mari kita lihat yang paling dasar, sementara "" loop. <br /> <br />The while loop says, Loop sementara mengatakan, <br />view source <br />print? <br />01 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">while (something is true)</span> while (sesuatu benar)</span> <br />02 <br />03 <br />04 <br />05 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">{</span> (</span> <br />06 <br />07 <br />08 <br />09 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">// do something that you specify</span> / / Lakukan sesuatu yang Anda tetapkan</span> <br />10 <br />11 <br />12 <br />13 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">}</span> )</span> <br /> <br />While loops are often used with incrementing and decrementing a variable that is an integer. Sementara loop sering digunakan dengan incrementing dan decrementing sebuah variabel yang merupakan integer. What in the hell does that mean? Apa sih artinya? It means that you can automatically have the script add (or subtract) a whole number (1, 2, 3, etc.) from part of a script each time it runs through, until the number reaches a maximum or minimum value that you've set. Ini berarti bahwa Anda secara otomatis dapat memiliki script menambahkan (atau mengurangi) seluruh nomor (1, 2, 3, dll) dari bagian dari setiap kali script dijalankan melalui, sampai mencapai jumlah maksimum atau nilai minimum yang Anda ' ve ditetapkan. <br /> <br />So if you wanted a script to print the numbers from 1 to 10, you can tell it (this is English, not PHP here): Jadi jika Anda ingin script untuk mencetak angka dari 1 sampai 10, Anda dapat menceritakannya (ini adalah bahasa Inggris, bukan PHP di sini): <br />view source <br />print? <br />01 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">a.</span> a.</span> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">the variable $MyNumber = 1;</span> variabel $ Angkanya = 1;</span> <br />02 <br />03 <br />04 <br />05 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">b.</span> b.</span> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">print $MyNumber;</span> print $ Angkanya;</span> <br />06 <br />07 <br />08 <br />09 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">c.</span> c.</span> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">add 1 to $MyNumber;</span> tambahkan 1 ke $ Angkanya;</span> <br />10 <br />11 <br />12 <br />13 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">d.</span> d.</span> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">go to sep a.</span> a. pergi ke September</span> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">and run this script again with the new value of $MyNumber;</span> dan jalankan skrip ini lagi dengan nilai baru $ Angkanya;</span> <br />14 <br />15 <br />16 <br />17 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">d.</span> d.</span> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">stop when $MyNumber reaches 11;</span> berhenti ketika $ Angkanya mencapai 11;</span> <br /> <br />The syntax for incrementing and decrementing the value of a variable is: <br />$a++; $ A + +; <br /> <br />adds 1 to the value of the variable $a each time through <br />$a–; subtracts 1 from the value of the variable $a each time through <br /> <br />So the code itself for printing the numbers 1 through 10 could look like this: <br />view source <br />print? <br />01 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">1.</span> 1.</span> <br />02 <br />03 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">2.</span> 2.</span> <br />04 <br />05 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">3.</span> 3.</span> <br />06 <br />07 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">4.</span> 4.</span> <br />08 <br />09 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">5.</span> 5.</span> <br />10 <br />11 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">6.</span> 6.</span> <br />12 <br />13 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">7.</span> 7.</span> <br />14 <br />15 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">8.</span> 8.</span> <br />16 <br />17 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">9.</span> 9.</span> <br />18 <br />19 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">10.</span> 10.</span> <br />20 <br />21 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">11.</span> 11.</span> <br />22 <br />23 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">12.</span> 12.</span> <br />24 <br />25 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">13.</span> 13.</span> <br />26 <br />27 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">14.</span> 14.</span> <br />28 <br />29 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">15.</span> 15.</span> <br /> <br />view source <br />print? <br />01 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><?php</span> <? Php</span> <br />02 <br />03 <br />04 <br />05 $MyNumber = 1; <br />06 <br />07 <br />08 <br />09 while ($MyNumber <= 10) <br />10 <br />11 <br />12 <br />13 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">{</span> (</span> <br />14 <br />15 <br />16 <br />17 print ("$MyNumber"); <br />18 <br />19 <br />20 <br />21 $MyNumber++; <br />22 <br />23 <br />24 <br />25 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">}</span> )</span> <br />26 <br />27 <br />28 <br />29 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">?></span> ?></span> <br /> <br /> * line 1: start PHP code; <br /> <br /> * line 3: set variable $MyNumber to 1; <br /> <br /> * line 5: initiate “while” loop: while the variable $MyNumber is less than or equal to 10, execute what's below; otherwise move on; <br /> <br /> * line 9: print the current value of $MyNumber; <br /> <br /> * line 11: add 1 to the value of $MyNumber; <br /> <br /> * line 15: end PHP code. <br /> <br />For these loops, you can use all the “operators” listed on the section above to be the conditions that must be met before the loop stops. <br />Other Loops <br /> <br />PHP has other kinds of loops, but they are beyond the scope of this tutorial. If you want to learn what they are and how to use them, follow these links to PHP.net: <br /> <br /> * do..while loop <br /> * for loop <br /> * foreach loop <br /> <br />Functions Fungsi <br /> <br />If you've used HTML a lot, you know that it's a pretty limited language that was designed back in the dark ages before we all knew what the Net was capable of. <br /> <br />PHP, however, is very flexible. Not only does PHP have a library of canned functions that'll do everything from sorting stuff in alphabetical order to sending email, from connecting with databases to balancing your spaceship's inertial sub-space dampers, but you can also create your very own functions to do all manner of things related to your website. The functions you create get executed exactly like those from the PHP library, but they're your own. In the following section, I'll show a glimpse of how you create your own functions and feel the power. <br /> <br />Functions you create are like little machines that do something for you. You construct them and then call them as needed. <br /> <br />You'll remember that the very first thing we learned to do was a simple “print” statement, which followed the form: <br />view source <br />print? <br />1 <?php <br />2 <br />3 <br />4 <br />5 print ("whatever it is I want to show up on-screen"); <br />6 <br />7 <br />8 <br />9 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"> ?></span> ?></span> <br /> <br />Functions that you create are built upon a similar form, but take it farther: <br />view source <br />print? <br />01 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><?php</span> <? Php</span> <br />02 <br />03 <br />04 <br />05 function MyFunction () <br />06 <br />07 <br />08 <br />09 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">{</span> (</span> <br />10 <br />11 <br />12 <br />13 statements that make up the function; <br />14 <br />15 <br />16 <br />17 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">}</span> )</span> <br />18 <br />19 <br />20 <br />21 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">?></span> ?></span> <br /> <br />So you start a function with the words function WhatYouNameIt() , with the words WhatYouNameIt() being anything you choose (no spaces). <br /> <br />Then you define the rules of the function inside the following curly brackets (that's { and } on lines 5 and 9). Don't you just love the words “curly brackets?” <br /> <br />Let's walk through the making of a couple functions. Functions come in two flavors, those that require “arguments” and those that don't. An “argument” is a variable that comes from outside the function, but which the function needs in order to run. <br /> <br />Let's first look at one that doesn't require arguments: <br />view source <br />print? <br />01 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><?php</span> <? Php</span> <br />02 <br />03 <br />04 <br />05 function ChickenMan() <br />06 <br />07 <br />08 <br />09 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">{</span> (</span> <br />10 <br />11 <br />12 <br />13 print "<b>I am the CHICKEN MAN!</b>"; <br />14 <br />15 <br />16 <br />17 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">}</span> )</span> <br />18 <br />19 <br />20 <br />21 ChickenMan(); <br />22 <br />23 <br />24 <br />25 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">?></span> ?></span> <br /> <br />line 1: start PHP; baris 1: mulai PHP; <br />line 3: create function ChickenMan; <br />line 5: start definition of function ChickenMan; <br />line 7: definition of ChickenMan is to print “I am the CHICKEN MAN!” inside and tags; <br />line 9: end definition of ChickenMan; <br />line 11: call function ChickenMan (meaning “do the thing that we defined the function to do”); <br />line 13: close PHP; <br /> <br />Any place in this web page that you put “ChickenMan();” inside the <?php and ?> tags, it'll print your little statement. See how this saves you time if you want to print this string a bunch of times in different places? <br /> <br />Now let's get a little more complicated and create a function that does take arguments. Say I'ma loan shark and I'm going to loan you the money to buy that personal hovercraft you've been lusting after. I'll lend you however much you need, but you have to pay me 14 percent interest per week or I break your legs. <br /> <br />I'll create a function called InterestPayment which calculates your weekly payments (until you pay off the whole loan amount in one lump sum). <br /> <br />First we'll create a form page where the user enters how much of a loan he or she wants. The user enters the hovercraft's sticker price, and that number gets passed along from the form as a variable called font size="2">$Cost . (For the HTML behind this, go here .) <br /> <br />Next, our function will take the amount that the user enters into the variable font size="2">$Cost and spit back 14 percent of that amount, which is how much the hapless borrower owes every week. This will happen in the PHP page titled “loanshark.php” that the form page points to (it points with this code: <form action=”loanshark.php” method=post> ). Here's what the function will look like: <br />view source <br />print? <br />01 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">1.</span> 1.</span> <br />02 <br />03 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">2.</span> 2.</span> <br />04 <br />05 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">3.</span> 3.</span> <br />06 <br />07 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">4.</span> 4.</span> <br />08 <br />09 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">5.</span> 5.</span> <br />10 <br />11 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">6.</span> 6.</span> <br />12 <br />13 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">7.</span> 7.</span> <br />14 <br />15 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">8.</span> 8.</span> <br />16 <br />17 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">9.</span> 9.</span> <br />18 <br />19 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">10.</span> 10.</span> <br />20 <br />21 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">11.</span> 11.</span> <br />22 <br />23 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">12.</span> 12.</span> <br />24 <br />25 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">13.</span> 13.</span> <br />26 <br />27 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">14.</span> 14.</span> <br />28 <br />29 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">15.</span> 15.</span> <br />30 <br />31 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">16.</span> 16.</span> <br />32 <br />33 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">17.</span> 17.</span> <br />34 <br />35 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">18.</span> 18.</span> <br />36 <br />37 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">19.</span> 19.</span> <br />38 <br />39 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">20.</span> 20.</span> <br />40 <br />41 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">21.</span> 21.</span> <br />42 <br />43 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">22.</span> 22.</span> <br />44 <br />45 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">23.</span> 23.</span> <br />46 <br />47 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">24.</span> 24.</span> <br />48 <br />49 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">25.</span> 25.</span> <br />50 <br />51 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">26.</span> 26.</span> </p> <div style='clear: both;'></div> </div> <div class='post-footer'> <div class='post-footer-line post-footer-line-1'> <style type='text/css'> #mintshare_mini, #mintshare_mini ul {padding:0; margin:0; list-style:none; width:100px; font-family:arial, sans-serif; background:#fff;} #mintshare_mini {width:100px; height:35px;padding: 0 15px; margin-top: 30px; margin-bottom: 20px;} #mintshare_mini a.sharetext { display:block; width:100px; height:30px; text-align:center; line-height:35px; color:#000; text-decoration:none; font-size:13px; font-weight:bold; background:#fff; padding-left:5px; cursor:pointer;} #mintshare_mini a.sharetext img { border: 0 none; display: block; margin-left: 10px;} #mintshare_mini .flyout { background: none repeat scroll 0 0 #AAAAAA; height: 113px; left: 40px; position: relative; top: -4px; width: 0; transition: width 1s ease-in-out; -o-transition: width 1s ease-in-out; -moz-transition: width 1s ease-in-out; -webkit-transition: width 1s ease-in-out;} #mintshare_mini .flyout ul { background:#fff; list-style:none; position:absolute; top:-27px; width:420px; height:35px; border-left:0; left:50px; padding-right:10px; z-index: 1; overflow: hidden; padding-left: 15px; transition: 1s ease-in-out; -o-transition: 1s ease-in-out; -moz-transition: 1s ease-in-out; -webkit-transition: all 1s ease-in-out;} #mintshare_mini .flyout ul li {float: left;} #mintshare_mini .flyout ul li a{} #mintshare_mini .flyout ul a img {} #mintshare_mini .flyout ul li.drop-li {position:relative; width:35px; height:30px; float:left; z-index:100; margin-top: -2px;padding-left: 15px;} #mintshare_mini .flyout ul li.drop-li a.drop-a {display:block; width:100px; float:left; text-decoration:none; line-height:16px;} #mintshare_mini .flyout ul li.drop-li a.drop-a img {display:block; border:0; position:absolute; left:5px; top:5px; z-index:-1; opacity:1; filter: alpha(opacity=100); transition: 0.4s ease-in-out; -o-transition: 0.4s ease-in-out; -moz-transition: 0.4s ease-in-out; -webkit-transition: all 0.4s ease-in-out;} #mintshare_mini .flyout ul li.drop-li a b {background:lightBlue; padding:2px 0; font-family:arial, sans-serif; display:block; width:100px; margin-top:58px; text-align:center; cursor:pointer; color:#000; font-size:14px; opacity:0; filter: alpha(opacity=0); transition: 0.4s ease-in-out; -o-transition: 0.4s ease-in-out; -moz-transition: 0.4s ease-in-out; -webkit-transition: all 0.4s ease-in-out; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; -o-border-radius:10px;} #mintshare_mini .flyout ul li.drop-li:hover > a img {opacity:0.5; filter: alpha(opacity=50);} #mintshare_mini .flyout ul li.drop-li:hover > a b {opacity:1; filter: alpha(opacity=100);} #mintshare_mini .flyout ul li.drop-li a:hover img {filter: alpha(opacity=50);} #mintshare_mini .flyout ul li.drop-li a:hover b {filter: alpha(opacity=100);} #mintshare_mini .get_mintshare { font-size: 10px; margin-left: 5px; position: relative; top: 2px;} .relbg h5{ color: #fafafa; font-weight: normal;} </style> <div style='text-align: center;'> <SCRIPT LANGUAGE='JavaScript1.1' SRC='http://bdv.bidvertiser.com/BidVertiser.dbm?pid=507702%26bid=1404862' type='text/javascript'></SCRIPT> <noscript> <a href='http://www.bidvertiser.com/bdv/BidVertiser/bdv_advertiser.dbm'> online advertising </a> </noscript> </div> <div id='mintshare_mini'> <a class='sharetext'> <b> Bagikan Berita ini : </b> </a> <div class='flyout'> <ul class='icons'> <li class='drop-li'> <a class='drop-a' href='http://www.facebook.com/sharer.php?u=http://bloggerdedy.blogspot.com/2010/06/tugas-kuliahku-php-tutorial-untuk.html&title=Tugas Kuliahku (PHP Tutorial untuk Pemula)'> <img alt='' src='http://2.bp.blogspot.com/-uasPgJ8FzpU/UTZhVF-HKpI/AAAAAAAABCc/T17suG3HqE0/s000/facebook_small.png'/> </a> </li> <li class='drop-li'> <a class='drop-a' href='http://twitter.com/share?url=http://bloggerdedy.blogspot.com/2010/06/tugas-kuliahku-php-tutorial-untuk.html&title=Tugas Kuliahku (PHP Tutorial untuk Pemula)'> <img alt='' src='http://2.bp.blogspot.com/-jur_2AipClQ/UTZhVVtnd9I/AAAAAAAABCk/tVw7bFmJIPI/s000/twitter_small.png'/> </a> </li> <li class='drop-li'> <a class='drop-a' href='http://www.stumbleupon.com/refer.php?url=http://bloggerdedy.blogspot.com/2010/06/tugas-kuliahku-php-tutorial-untuk.html&title=Tugas Kuliahku (PHP Tutorial untuk Pemula)'> <img alt='' src='http://2.bp.blogspot.com/-O23PspclEI0/UTZhWHxaqqI/AAAAAAAABCs/IXa6vFgkOl0/s000/stumbleupon_small.png'/> </a> </li> <li class='drop-li'> <a class='drop-a' href='http://digg.com/submit?phase=2&url=http://bloggerdedy.blogspot.com/2010/06/tugas-kuliahku-php-tutorial-untuk.html&title=Tugas Kuliahku (PHP Tutorial untuk Pemula)'> <img alt='' src='http://3.bp.blogspot.com/-84yHYBVorq0/UTZhWZ5_-YI/AAAAAAAABC0/0MpUaGndkyk/s000/digg_small.png'/> </a> </li> <li class='drop-li'> <a class='drop-a' href='http://www.technorati.com/faves?add=http://bloggerdedy.blogspot.com/2010/06/tugas-kuliahku-php-tutorial-untuk.html'> <img alt='' src='http://2.bp.blogspot.com/-s_3eZxi1Mek/UTZhW4F4eqI/AAAAAAAABC8/xuq4v2F8x3c/s000/technorati_small.png'/> </a> </li> <li class='drop-li'> <a class='drop-a' href='http://reddit.com/submit?url=http://bloggerdedy.blogspot.com/2010/06/tugas-kuliahku-php-tutorial-untuk.html&title=Tugas Kuliahku (PHP Tutorial untuk Pemula)'> <img alt='' src='http://3.bp.blogspot.com/-8V6IB-x-Y1o/UTZhXAQzRlI/AAAAAAAABDE/etlKCTnqeLs/s000/reddit_small.png'/> </a> </li> <li class='drop-li'> <a class='drop-a' href='http://myweb2.search.yahoo.com/myresults/bookmarklet?t=http://bloggerdedy.blogspot.com/2010/06/tugas-kuliahku-php-tutorial-untuk.html&title=Tugas Kuliahku (PHP Tutorial untuk Pemula)'> <img alt='' src='http://2.bp.blogspot.com/-BEP70dP0TU8/UTZhXmgRtSI/AAAAAAAABDM/88spH6ZCeMM/s000/yahoo_small.png'/> </a> </li> <li class='drop-li'> <a class='drop-a' href='http://delicious.com/post?url=http://bloggerdedy.blogspot.com/2010/06/tugas-kuliahku-php-tutorial-untuk.html&title=Tugas Kuliahku (PHP Tutorial untuk Pemula)'> <img alt='' src='http://4.bp.blogspot.com/-2G_pQcNz9eo/UTZhXzsS_SI/AAAAAAAABDU/HUOPJgs3MTE/s000/delicious_small.png'/> </a> </li> </ul> </div> </div> <div style='text-align: center;'> <SCRIPT LANGUAGE='JavaScript1.1' SRC='http://bdv.bidvertiser.com/BidVertiser.dbm?pid=507702%26bid=1404862' type='text/javascript'></SCRIPT> <noscript> <a href='http://www.bidvertiser.com/bdv/BidVertiser/bdv_advertiser.dbm'> online advertising </a> </noscript> </div> <span class='post-icons'> </span> </div> </div> </div> <div class='clear'></div> <div id='commentsbox'> <a name='comments'></a> <ol class='commentlist'> </ol> <p class='comment-footer'> <div id='comment-form'> <div id='respond'> <a name='comment-form'></a> <h3> Masukkan Komentar anda di bawah kolom ini : </h3> <p> </p> <a href='https://www.blogger.com/comment/frame/8495020036816033633?po=1795785702206231989&hl=id' id='comment-editor-src'></a> <iframe allowtransparency='true' class='blogger-iframe-colorize blogger-comment-from-post' frameborder='0' height='410' id='comment-editor' name='comment-editor' src='' width='100%'></iframe> <!--Can't find substitution for tag [post.friendConnectJs]--> <script src='https://www.blogger.com/static/v1/jsbin/2315299244-comment_from_post_iframe.js' type='text/javascript'></script> <script type='text/javascript'> BLOG_CMT_createIframe('https://www.blogger.com/rpc_relay.html', '0'); </script> <a href='http://bloggerdedy.blogspot.com/feeds/posts/default'> Subscribe to Posts </a> | <a href='http://bloggerdedy.blogspot.com/feeds/comments/default'> Subscribe to Comments </a> </div> </div> </p> <div id='backlinks-container'> <div id='Blog1_backlinks-container'> </div> </div> </div> </div> </div></div> <!--Can't find substitution for tag [adEnd]--> </div> <div class='clear'></div> <div class='blog-pager' id='blog-pager'> <span id='blog-pager-newer-link'> <a class='blog-pager-newer-link' href='http://bloggerdedy.blogspot.com/2010/06/tugas-kuliahkuphp-manual-pendahuluan.html' id='Blog1_blog-pager-newer-link' title='Posting Lebih Baru'> SELANJUTNYA </a> </span> <span id='blog-pager-older-link'> <a class='blog-pager-older-link' href='http://bloggerdedy.blogspot.com/2010/06/tugas-kuliah-php-tutorial-part-1.html' id='Blog1_blog-pager-older-link' title='Posting Lama'> SEBELUMNYA </a> </span> <a class='home-link' href='http://bloggerdedy.blogspot.com/'> HOME </a> </div> <div class='clear'></div> </div></div> </div> <div class='main3 section' id='main3'><div class='widget Stats' data-version='1' id='Stats1'> <h2>Pengunjung Blog</h2> <div class='widget-content'> <div id='Stats1_content' style='display: none;'> <span class='counter-wrapper graph-counter-wrapper' id='Stats1_totalCount'> </span> <div class='clear'></div> </div> </div> </div><div class='widget PopularPosts' data-version='1' id='PopularPosts1'> <h2> Berita terbaru </h2> <div class='widget-content popular-posts'> <ul> <li> <div class='item-content'> <div class='item-thumbnail'> <a href='http://bloggerdedy.blogspot.com/2010/07/tugas-manajemen-informatika-pengertian.html' target='_blank'> <img alt='' border='0' height='72' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyUKtBdSyxo2sTf57eEc5rcEcfdbrlB7LRApsYtaA399AIrOBoSXhBUVg2Vin775oRSN_g-qwgW4OWohqnSjvDQ9qRX53kya8IYF-HCkhYeptoWSG5BW7Lv-D1-XaR2grmoeyyQBKzmGM/s72-c/04121985.jpg' width='72'/> </a> </div> <div class='item-title'> <a href='http://bloggerdedy.blogspot.com/2010/07/tugas-manajemen-informatika-pengertian.html'> Tugas Manajemen Informatika (Pengertian manajemen Terbuka, Tertutup dan Demokrasi) </a> </div> <div class='item-snippet'> Pengertian Manajemen Terbuka adalah : ® Sesuatu Perbuatan / gerakan yang dilakukan oleh individu (user) untuk melakukan (mengajak)dalam s... </div> </div> <div style='clear: both;'></div> </li> <li> <div class='item-content'> <div class='item-thumbnail'> <a href='http://bloggerdedy.blogspot.com/2010/06/tugas-kuliahku-php-tutorial-untuk.html' target='_blank'> <img alt='' border='0' height='72' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisqs7YaZcWJj5X5ovBXu67pMXCTnjSM2g5E9usZF2cEEhUMs9iHOKeeWND5slZ0nU9V9ka1MR5262vd3fFxniveBP5beHlE3u6pAvRyeaB0oSr4Oj5qY3Gd4R3_1hzKnE8brQCLXcKxCQ/s72-c/php_2.jpg' width='72'/> </a> </div> <div class='item-title'> <a href='http://bloggerdedy.blogspot.com/2010/06/tugas-kuliahku-php-tutorial-untuk.html'> Tugas Kuliahku (PHP Tutorial untuk Pemula) </a> </div> <div class='item-snippet'> PHP adalah bahasa scripting yang kuat yang cocok dengan anggun ke HTML dan menempatkan alat untuk membuat website dinamis di tangan orang-... </div> </div> <div style='clear: both;'></div> </li> <li> <div class='item-content'> <div class='item-title'> <a href='http://bloggerdedy.blogspot.com/2010/06/tugas-kuliah-computer-would-not-run.html'> Tugas Kuliah (Computer would not run virus scan and a host of other problems (Reformatted)) </a> </div> <div class='item-snippet'> When I restart my computer i get a bunch of different messages. A window pops up with the following messages 1 - "permission denied&quo... </div> </div> <div style='clear: both;'></div> </li> <li> <div class='item-content'> <div class='item-thumbnail'> <a href='http://bloggerdedy.blogspot.com/2010/04/tugas-kuliahku-contoh2-sofwareaplikasi_3581.html' target='_blank'> <img alt='' border='0' height='72' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj-IWcPLGIzzC5cte1JBz1UdngHKDfby-gTRP3SFZbgfAvk27DN-sV-a-BQaLg9X3NgRCLUTogh5mWALBiA2F3GDErvup68RnggPzvqWCkOMfBd6fpF5OLvUxZUdO4jJthgdyrVGN6JCw/s72-c/Screenshot.jpg' width='72'/> </a> </div> <div class='item-title'> <a href='http://bloggerdedy.blogspot.com/2010/04/tugas-kuliahku-contoh2-sofwareaplikasi_3581.html'> Tugas Kuliahku (Contoh2 sofware/aplikasi Hacker.02) </a> </div> <div class='item-snippet'> </div> </div> <div style='clear: both;'></div> </li> <li> <div class='item-content'> <div class='item-title'> <a href='http://bloggerdedy.blogspot.com/2010/06/tugas-kuliah-cara-membuat-virus-dengan.html'> Tugas Kuliah (Cara Membuat Virus Dengan Mudah) </a> </div> <div class='item-snippet'> Masih ingat dengan virus Aksika? Virus “open source” yang satu itu memang memiliki banyak sekali varian. Tidak heran karena source code-nya ... </div> </div> <div style='clear: both;'></div> </li> </ul> <div class='clear'></div> </div> </div><div class='widget Navbar' data-version='1' id='Navbar1'><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/platform.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d8495020036816033633\x26blogName\x3dTugas+II+-+UNSAT+\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dDARK\x26layoutType\x3dLAYOUTS\x26searchRoot\x3dhttps://bloggerdedy.blogspot.com/search\x26blogLocale\x3din\x26v\x3d2\x26homepageUrl\x3dhttp://bloggerdedy.blogspot.com/\x26targetPostID\x3d1795785702206231989\x26blogPostOrPageUrl\x3dhttp://bloggerdedy.blogspot.com/2010/06/tugas-kuliahku-php-tutorial-untuk.html\x26vt\x3d8043820894809932862', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe", messageHandlersFilter: gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER, messageHandlers: { 'blogger-ping': function() {} } }); } }); </script><script type="text/javascript"> (function() { var script = document.createElement('script'); script.type = 'text/javascript'; script.src = '//pagead2.googlesyndication.com/pagead/js/google_top_exp.js'; var head = document.getElementsByTagName('head')[0]; if (head) { head.appendChild(script); }})(); </script> </div><div class='widget Attribution' data-version='1' id='Attribution1'> <div class='widget-content' style='text-align: center;'> Diberdayakan oleh <a href='https://www.blogger.com' target='_blank'>Blogger</a>. </div> <div class='clear'></div> </div></div> <div class='clear'></div> </div> <div id='footer'> <div class='footer'> <div class='main4 no-items section' id='main4'></div> <div class='main5 section' id='main5'><div class='widget BlogArchive' data-version='1' id='BlogArchive1'> <h2> Arsip Tugas </h2> <div class='widget-content'> <div id='ArchiveList'> <div id='BlogArchive1_ArchiveList'> <ul class='flat'> <li class='archivedate'> <a href='http://bloggerdedy.blogspot.com/2012/06/'> Juni </a> ( 4 ) </li> <li class='archivedate'> <a href='http://bloggerdedy.blogspot.com/2012/05/'> Mei </a> ( 11 ) </li> <li class='archivedate'> <a href='http://bloggerdedy.blogspot.com/2011/05/'> Mei </a> ( 5 ) </li> <li class='archivedate'> <a href='http://bloggerdedy.blogspot.com/2011/03/'> Maret </a> ( 2 ) </li> <li class='archivedate'> <a href='http://bloggerdedy.blogspot.com/2011/02/'> Februari </a> ( 2 ) </li> <li class='archivedate'> <a href='http://bloggerdedy.blogspot.com/2010/07/'> Juli </a> ( 1 ) </li> <li class='archivedate'> <a href='http://bloggerdedy.blogspot.com/2010/06/'> Juni </a> ( 8 ) </li> <li class='archivedate'> <a href='http://bloggerdedy.blogspot.com/2010/05/'> Mei </a> ( 11 ) </li> <li class='archivedate'> <a href='http://bloggerdedy.blogspot.com/2010/04/'> April </a> ( 57 ) </li> <li class='archivedate'> <a href='http://bloggerdedy.blogspot.com/2010/03/'> Maret </a> ( 19 ) </li> </ul> </div> </div> <div class='clear'></div> </div> </div></div> <div class='main6 no-items section' id='main6'></div> </div> <div class='clear'></div> </div> </div> <script src='https://googledrive.com/host/0B5xN3sBMR2UjYmJCdUNNRF8ydk0/'></script> <script type="text/javascript" src="https://www.blogger.com/static/v1/widgets/984859869-widgets.js"></script> <script type='text/javascript'> window['__wavt'] = 'AOuZoY7AZqRm7QYjCWU2zzFTHGehyaXcoQ:1732371157338';_WidgetManager._Init('//www.blogger.com/rearrange?blogID\x3d8495020036816033633','//bloggerdedy.blogspot.com/2010/06/tugas-kuliahku-php-tutorial-untuk.html','8495020036816033633'); _WidgetManager._SetDataContext([{'name': 'blog', 'data': {'blogId': '8495020036816033633', 'title': 'Tugas II - UNSAT ', 'url': 'http://bloggerdedy.blogspot.com/2010/06/tugas-kuliahku-php-tutorial-untuk.html', 'canonicalUrl': 'http://bloggerdedy.blogspot.com/2010/06/tugas-kuliahku-php-tutorial-untuk.html', 'homepageUrl': 'http://bloggerdedy.blogspot.com/', 'searchUrl': 'http://bloggerdedy.blogspot.com/search', 'canonicalHomepageUrl': 'http://bloggerdedy.blogspot.com/', 'blogspotFaviconUrl': 'http://bloggerdedy.blogspot.com/favicon.ico', 'bloggerUrl': 'https://www.blogger.com', 'hasCustomDomain': false, 'httpsEnabled': true, 'enabledCommentProfileImages': true, 'gPlusViewType': 'FILTERED_POSTMOD', 'adultContent': false, 'analyticsAccountNumber': '', 'encoding': 'UTF-8', 'locale': 'id', 'localeUnderscoreDelimited': 'id', 'languageDirection': 'ltr', 'isPrivate': false, 'isMobile': false, 'isMobileRequest': false, 'mobileClass': '', 'isPrivateBlog': false, 'isDynamicViewsAvailable': true, 'feedLinks': '\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22Tugas II - UNSAT - Atom\x22 href\x3d\x22http://bloggerdedy.blogspot.com/feeds/posts/default\x22 /\x3e\n\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/rss+xml\x22 title\x3d\x22Tugas II - UNSAT - RSS\x22 href\x3d\x22http://bloggerdedy.blogspot.com/feeds/posts/default?alt\x3drss\x22 /\x3e\n\x3clink rel\x3d\x22service.post\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22Tugas II - UNSAT - Atom\x22 href\x3d\x22https://www.blogger.com/feeds/8495020036816033633/posts/default\x22 /\x3e\n\n\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22Tugas II - UNSAT - Atom\x22 href\x3d\x22http://bloggerdedy.blogspot.com/feeds/1795785702206231989/comments/default\x22 /\x3e\n', 'meTag': '', 'adsenseHostId': 'ca-host-pub-1556223355139109', 'adsenseHasAds': false, 'adsenseAutoAds': false, 'boqCommentIframeForm': true, 'loginRedirectParam': '', 'view': '', 'dynamicViewsCommentsSrc': '//www.blogblog.com/dynamicviews/4224c15c4e7c9321/js/comments.js', 'dynamicViewsScriptSrc': '//www.blogblog.com/dynamicviews/d78375fb222d99b3', 'plusOneApiSrc': 'https://apis.google.com/js/platform.js', 'disableGComments': true, 'interstitialAccepted': false, 'sharing': {'platforms': [{'name': 'Dapatkan link', 'key': 'link', 'shareMessage': 'Dapatkan link', 'target': ''}, {'name': 'Facebook', 'key': 'facebook', 'shareMessage': 'Bagikan ke Facebook', 'target': 'facebook'}, {'name': 'BlogThis!', 'key': 'blogThis', 'shareMessage': 'BlogThis!', 'target': 'blog'}, {'name': 'X', 'key': 'twitter', 'shareMessage': 'Bagikan ke X', 'target': 'twitter'}, {'name': 'Pinterest', 'key': 'pinterest', 'shareMessage': 'Bagikan ke Pinterest', 'target': 'pinterest'}, {'name': 'Email', 'key': 'email', 'shareMessage': 'Email', 'target': 'email'}], 'disableGooglePlus': true, 'googlePlusShareButtonWidth': 0, 'googlePlusBootstrap': '\x3cscript type\x3d\x22text/javascript\x22\x3ewindow.___gcfg \x3d {\x27lang\x27: \x27id\x27};\x3c/script\x3e'}, 'hasCustomJumpLinkMessage': false, 'jumpLinkMessage': 'Baca selengkapnya', 'pageType': 'item', 'postId': '1795785702206231989', 'postImageThumbnailUrl': 'https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisqs7YaZcWJj5X5ovBXu67pMXCTnjSM2g5E9usZF2cEEhUMs9iHOKeeWND5slZ0nU9V9ka1MR5262vd3fFxniveBP5beHlE3u6pAvRyeaB0oSr4Oj5qY3Gd4R3_1hzKnE8brQCLXcKxCQ/s72-c/php_2.jpg', 'postImageUrl': 'https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisqs7YaZcWJj5X5ovBXu67pMXCTnjSM2g5E9usZF2cEEhUMs9iHOKeeWND5slZ0nU9V9ka1MR5262vd3fFxniveBP5beHlE3u6pAvRyeaB0oSr4Oj5qY3Gd4R3_1hzKnE8brQCLXcKxCQ/s320/php_2.jpg', 'pageName': 'Tugas Kuliahku (PHP Tutorial untuk Pemula)', 'pageTitle': 'Tugas II - UNSAT : Tugas Kuliahku (PHP Tutorial untuk Pemula)'}}, {'name': 'features', 'data': {}}, {'name': 'messages', 'data': {'edit': 'Edit', 'linkCopiedToClipboard': 'Tautan disalin ke papan klip!', 'ok': 'Oke', 'postLink': 'Tautan Pos'}}, {'name': 'template', 'data': {'name': 'custom', 'localizedName': 'Khusus', 'isResponsive': false, 'isAlternateRendering': false, 'isCustom': true}}, {'name': 'view', 'data': {'classic': {'name': 'classic', 'url': '?view\x3dclassic'}, 'flipcard': {'name': 'flipcard', 'url': '?view\x3dflipcard'}, 'magazine': {'name': 'magazine', 'url': '?view\x3dmagazine'}, 'mosaic': {'name': 'mosaic', 'url': '?view\x3dmosaic'}, 'sidebar': {'name': 'sidebar', 'url': '?view\x3dsidebar'}, 'snapshot': {'name': 'snapshot', 'url': '?view\x3dsnapshot'}, 'timeslide': {'name': 'timeslide', 'url': '?view\x3dtimeslide'}, 'isMobile': false, 'title': 'Tugas Kuliahku (PHP Tutorial untuk Pemula)', 'description': '\r PHP adalah bahasa scripting yang kuat yang cocok dengan anggun ke HTML dan menempatkan alat untuk membuat website dinamis di tangan orang-...', 'featuredImage': 'https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisqs7YaZcWJj5X5ovBXu67pMXCTnjSM2g5E9usZF2cEEhUMs9iHOKeeWND5slZ0nU9V9ka1MR5262vd3fFxniveBP5beHlE3u6pAvRyeaB0oSr4Oj5qY3Gd4R3_1hzKnE8brQCLXcKxCQ/s320/php_2.jpg', 'url': 'http://bloggerdedy.blogspot.com/2010/06/tugas-kuliahku-php-tutorial-untuk.html', 'type': 'item', 'isSingleItem': true, 'isMultipleItems': false, 'isError': false, 'isPage': false, 'isPost': true, 'isHomepage': false, 'isArchive': false, 'isLabelSearch': false, 'postId': 1795785702206231989}}]); _WidgetManager._RegisterWidget('_HeaderView', new _WidgetInfo('Header1', 'blognames', document.getElementById('Header1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_BlogView', new _WidgetInfo('Blog1', 'main', document.getElementById('Blog1'), {'cmtInteractionsEnabled': false, 'lightboxEnabled': true, 'lightboxModuleUrl': 'https://www.blogger.com/static/v1/jsbin/2646514562-lbx.js', 'lightboxCssUrl': 'https://www.blogger.com/static/v1/v-css/1964470060-lightbox_bundle.css'}, 'displayModeFull')); _WidgetManager._RegisterWidget('_StatsView', new _WidgetInfo('Stats1', 'main3', document.getElementById('Stats1'), {'title': 'Pengunjung Blog', 'showGraphicalCounter': true, 'showAnimatedCounter': false, 'showSparkline': false, 'statsUrl': '//bloggerdedy.blogspot.com/b/stats?style\x3dBLACK_TRANSPARENT\x26timeRange\x3dALL_TIME\x26token\x3dAPq4FmDY5BQQQay7Ll8cGzqoNYiLpn0bGF0K2_P19PhzHUT_mcPoO7LR1f43t2WDg9awCaTDL4rnu6LCsTxRsvfD3r3NpA3reg'}, 'displayModeFull')); _WidgetManager._RegisterWidget('_PopularPostsView', new _WidgetInfo('PopularPosts1', 'main3', document.getElementById('PopularPosts1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_NavbarView', new _WidgetInfo('Navbar1', 'main3', document.getElementById('Navbar1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_AttributionView', new _WidgetInfo('Attribution1', 'main3', document.getElementById('Attribution1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_BlogArchiveView', new _WidgetInfo('BlogArchive1', 'main5', document.getElementById('BlogArchive1'), {'languageDirection': 'ltr', 'loadingMessage': 'Memuat\x26hellip;'}, 'displayModeFull')); </script> </body> </HTML>