Skip to content

PHP

Basic Block

<?php
// code
echo "Hello world!";
?>

Declaration

Data types not required

$my_var = "";

Get query parameters

$query_param = $_GET["query_param"];

Dates

data_default_timezone_set("Asia/Kolkata");

$date = date("Y-m-d");
$time = date("H:i:s");
Last Updated: 2024-05-12 ; Contributors: AhmedThahir

Comments