I think this will work.  You'll have to test it to confirm:

$A[0][0] = "x";
$A[0][1] = "x";
$A[0][2] = "x";
$A[0][3] = "x";
$A[0][4] = "x";
$A[1][0] = "0";
$A[1][1] = "0";
$A[1][2] = "0";
$A[1][3] = "0";
$A[1][4] = "0";

$B = $C = array();

$B = $A[0];
$C = $A[1];

$A[0] = $C;
$A[1] = $B;

-----Original Message-----
From: johannes reichardt [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 10, 2002 8:32 PM
To: [EMAIL PROTECTED]
Subject: [PHP] matrix functions


hi list, 

i have a question regarding a class for matrix modifications so i dont
have to re-invent the wheel ;)

i would like to do things like this:

matrix with 5*5 colums/rows

x x x x x 
0 0 0 0 0
x x x x x
x x x x x
x x x x x


x x x x x 
x x x x x
0 0 0 0 0
x x x x x
x x x x x


maybe that is incredebly stupid and simple but
my brain doesnt tell me anything right now - 
how can i transform colums/rows quickly and efficient?

Any help appreciated!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
 
****************************************************************************
This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message.  If you have received this message in error, please immediately
advise the sender by reply email and delete the message.  Thank you very
much.                                                                       

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to