Archive:PHP and MySQL Programming/Syntax Overview: Difference between revisions

wikademia>Kencyber
wikademia>Wikademia
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== PHP tags: ==
== PHP tags: ==
 
{{ntnes}}
=== '''<?php [code] ?>''' ===
=== '''<?php [code] ?>''' ===


Line 45: Line 45:


Which will output something like ''2005-11-09 19:40:05''.
Which will output something like ''2005-11-09 19:40:05''.
[[]]


== Commenting ==
== Commenting ==
Line 211: Line 212:
// $a[3] = 4;
// $a[3] = 4;


$b = array(“name” => ”Fred”, “age” => 30);
$b = array("name" => "Fred", "age" => 30);


// $b['name'] = “Fred”;
// $b['name'] = "Fred";


// $b['age'] = 30;
// $b['age'] = 30;
Line 349: Line 350:
      
      
     function who_am_i() {
     function who_am_i() {
       echo "My name is {$this->name), and I am a dog";
       echo "My name is {$this->name}, and I am a dog";
     }
     }
  }
  }