Skip to content

Instantly share code, notes, and snippets.

View ilhamarrouf's full-sized avatar
🏠
Working from home

Ilham Arrouf ilhamarrouf

🏠
Working from home
View GitHub Profile
+----+-------------------+---------------+---------------+----------+---------------------+----------------+------------------------+-----------------------+---------------------+---------------------+--------+
| id | nama | jenis_kelamin | tanggal_lahir | id_agama | email | telpon | alamat | id_status_kepegawaian | date_created | date_update | delete |
+----+-------------------+---------------+---------------+----------+---------------------+----------------+------------------------+-----------------------+---------------------+---------------------+--------+
| 1 | Wahid Ashari | Laki-laki | 1990-04-03 | 1 | [email protected] | +6287812340909 | Jalan Pegangsaan Timur | 2 | 2017-02-06 15:58:02 | 2017-02-06 15:58:02 | 0 |
| 2 | Martin Natalegawa | Laki-laki | 1979-12-28 | 2 | [email protected] | +6289655556543 | Jalan Lingkar Luar | 3 | 2017-02-06 15:58:02 |
@ilhamarrouf
ilhamarrouf / left-join
Last active February 8, 2017 00:37
JOIN SQL
+-------------------+------------------------+------------+
| nama | alamat | nama_agama |
+-------------------+------------------------+------------+
| Wahid Ashari | Jalan Pegangsaan Timur | Islam |
| Martin Natalegawa | Jalan Lingkar Luar | Kristen |
| Afika Notonegoro | Jalan Godean | NULL |
| Dahlan Iskandar | Jalan Tulip Semerbak | Budha |
| Afifah | Jalan Mawar Merah | Islam |
+-------------------+------------------------+------------+
<?php
$belajar = function() {
echo "Nama saya Muhamad Ilham Arrouf";
};
$belajar();
?>
@ilhamarrouf
ilhamarrouf / scope.php
Created January 2, 2017 23:09
PHP Function
<?php
$a = 2;
$b = 16;
// Cara 1
function cara1() {
global $a, $b;
$c = $a + $b;
@ilhamarrouf
ilhamarrouf / return.php
Last active January 2, 2017 22:59
PHP Function
<?php
// Contoh 1
function perkalian ($x, $y, $z)
{
$hasil = $x * $y * $z;
return $hasil;
}
echo perkalian(2, 2, 7);
<?php
function tampilkan($text, $angka)
{
$saya = "Saya " . $text . " " . $angka;
echo $saya;
}
function jarak()
{
@ilhamarrouf
ilhamarrouf / example.php
Created January 2, 2017 11:40
PHP Function
<?php
// Penulisan fungsi
function namadepan()
{
echo "Muhamad";
}
function namatengah()
{
echo "Ilham";
@ilhamarrouf
ilhamarrouf / syntax.php
Created January 2, 2017 10:42
PHP Function
<?php
function NamaFungsi() // NamaFungsi merupakan nama fungsi yang anda tentukan sendiri
{
kode yang akan di eksekusi;
}
?>
@ilhamarrouf
ilhamarrouf / switch.php
Created December 14, 2016 07:27
Struktur Kontrol PHP
<?php
$a = saya;
switch ($a) {
case kamu :
echo "Angka Nol";
break;
case dia :
echo "Angka Satu";
break;
@ilhamarrouf
ilhamarrouf / switch.sh
Created December 14, 2016 06:30
Sintaks Struktur Kontrol
switch ($var) {
case value1:
statement1;
break;
case value2:
statement2;
break;
case value3:
statement3;
break;