Posted by gg9h0st on 05/16/06 12:20
it's not vailable to make a variable named start with number like $0var
but while i do something i wrote the code like below.
it works while it seems like there's a variable named $1 :P
so now i'm interested in how i can access that on the other way.
i can't code to access that like [[ $1; ]] neither [[ $GLOBALS[1] or
$GLOBALS['1'] ]]
because $GLOBALS array has '1' key but not 1(number)
as u can see [[ ["v"]=> string(1) "1" ["1"]=> string(4) "this" ]] at
the end of $GLOBALS output. it prints [1] for numberic key 1.
is there other ways i can access that varialbe except using variable
variable?
<?php
#this is header
error_reporting(E_ALL);
?>
<?php
$v = '1';
$$v = 'this';
echo "${$v}" . '<br>';
var_dump($GLOBALS);
?>
Navigation:
[Reply to this message]
|