Compact variables : compact « Data Structure « PHP






Compact variables

 
<?php
$S= 'Cylinder';
$N= 'Rectangle';
$A= 'Sphere';
$O= 'Sphere';
$P= 'Rectangle';

$shapes = compact('S', 'N', 'A', 'O', 'P');
var_dump($shapes);
?>
  
  








Related examples in the same category