Forum Moderators: coopster
As a self-taught err... 'programmer,'* I often find holes in my knowledge...I'm going through a piece of code in an effort to patch some of the holes, and I keep seeing essentially this construct:
$someVariable = $someOther['variable[b][4].[/4][/b]']; I can see it's an array, but what's with the dot inside the quotes after the word "variable"?
-B
*This word meant to be understood in a way that carries no sense of 'expertise'... ;-)
[edit]I don't know what 'synatx' is either...[/edit]
$array['@48.']
is perfectly valid and doesn't mean anything special except that it is a different element than
$array['%[][][][.']
Obviously, if you take away the single quotes, you will get a fatal error.
Tom
mysql_query('SET @id =0;');
$sql = 'SELECT @id := @id +1';
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
print_r($row);
// returns:
Array
(
[@id := @id +1] => 1
)
Yuck. I like to keep my array names a bit more tidy and sensible, usually without any punctuation. But, to each their own...