A variable variable in PHP

<?php
$varname = 'tireqty';

$$varname = 100;

echo $tireqty; // output: 100
?>

Comments

Popular posts from this blog