Home / Code Snippets / PHP / Variable Variables

Variable Variables

<?php

  $var1 = 'nameOfVariable';

  $nameOfVariable = 'This is the value I want!';

  echo $$var1; 

?>