Skip to content

Instantly share code, notes, and snippets.

@gostrafx
Last active May 19, 2019 22:18
Show Gist options
  • Save gostrafx/e33981ab60c1a2ccba815330ba25c1cb to your computer and use it in GitHub Desktop.
Save gostrafx/e33981ab60c1a2ccba815330ba25c1cb to your computer and use it in GitHub Desktop.
Table PHP
<?php

<!-- Mon tableau -->

$retour = "<br />";
$prenom="John";//string
echo $prenom;
echo gettype($prenom);
echo $retour;
//----------------------
$age = 18; //integer
echo $age.' ';
echo gettype($age);
echo $retour;
//----------------------
$prix = 25.99;//double
echo $prix.' ';
echo gettype($prix);
echo $retour;
//----------------------
$retour="<br />";
$renom = true;//bool(true)
echo $renom;
echo var_dump($renom);
echo $retour;
//----------------------
$resulta = 5==2;//bool(false)
echo $resulta;
echo var_dump($resulta);
echo $retour;
//----------------------
$tableau[0]=15;//15array
echo $tableau[0];
echo gettype($tableau);
echo $retour;
//----------------------

$tableau[0]=15;
$tableau[1]=16;
$tableau[2]=17;
$tableau[3]=18;
echo "<pre>";
print_r($tableau);
echo "</pre>";
echo $retour;
//----------------------
$tableau1[0]=15;
$tableau1[1]=16;
$tableau1[2]=17;
$tableau1[3]=18;
//---------------
$tableau2[0]=15;
$tableau2[1]=16;
$tableau2[2]=17;
$tableau2[3]=18;
$class = array($tableau1,$tableau2);
echo "<pre>";
print_r($class);
echo "</pre>";
echo $retour;
//-------------------
$note =array(542,52542,52452,5425,5424);
echo "<pre>";
print_r($note);
echo "</pre>";
echo $retour;
//-------------------
$note1 =array(542,52542,52452,5425,5424);
$note2 =array(542,52542,52452,855445,54);
$note3 =array(542,5254211,52452,855445,54);
$class1=array($note1,$note2);
$class1[]=$note3;
echo "<pre>";
print_r($class1);
echo "</pre>";
echo $retour;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment