By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,744 Members | 1,716 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,744 IT Pros & Developers. It's quick & easy.

Explain...

P: n/a
Can someone please explain what this:

$variable = $variable2['xxx']['xx']

is? I mean is that putting two arrays together or what?

--
Sharif Tanvir Karim
http://www.onlyonxbox.net
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Sharif Tanvir Karim wrote:
Can someone please explain what this:

$variable = $variable2['xxx']['xx']

is? I mean is that putting two arrays together or what?


No, not really ...

$variable2 is an array of arrays; each element of it is an array --
mostly like an HTML table: each row in the table is a set of cells.

You can have something like:

<?php
$table = array();
$table['row1'] = array(); // not needed, just put it to make it easier
// to see this is an array :)
$table['row1']['cell1'] = 'top left';
$table['row1']['cell2'] = 'top center';
$table['row1']['cell3'] = 'top right';
$table['row2'] = array(); // not needed
$table['row2']['cell1'] = 'middle left';
// etc...

// and, of course, you can assign any of these values to a variable
$x = $table['row3']['cell3'];
// if logic doesn't fail me $x should have 'bottom right'
?>

HTH

--
I have a spam filter working.
To mail me include "urkxvq" (with or without the quotes)
in the subject line, or your mail will be ruthlessly discarded.
Jul 17 '05 #2

P: n/a

"Sharif Tanvir Karim" <sh****@nyc.rr.com> ha scritto nel messaggio
news:Pc*****************@twister.nyc.rr.com...
Can someone please explain what this:

$variable = $variable2['xxx']['xx']

is? I mean is that putting two arrays together or what?

you should try with some good PHP tutorial.

Bye.

Gius
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.