Jump to content

variable names


mister_t101

Recommended Posts

You probably want to look at [a href=\"http://us3.php.net/manual/en/language.variables.variable.php\" target=\"_blank\"]variable variables.[/a]
[code]<?php
$one = 'two';
$$one = 'three'; // this is equivalent to $two = 'three';
echo '$one = ' . $one . '<br>';
echo '$$one = ' . $$one . '<br>';
echo '$two = ' . $two . '<br>';
?>[/code]

Ken
Link to comment
https://forums.phpfreaks.com/topic/5741-variable-names/#findComment-20470
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.