print array
Posted: Thu Sep 07, 2006 10:24 am
Hello
I have the follwoing array
is there a way I could print it like
X 3.5000 3.5600
Y 2.7234 2.7805
Z 5.1768 2.2974
and another qusetion is: I have the follwing list...
x
3
4
Y
34
2
Z
1.125
3
... is there a way to create an array like this:
thankyou
I have the follwoing array
Code: Select all
Array ( [0] => X [1] => 3.5000 [2] => 3.5600 [3] => Y [4] => 2.7234 [5] => 2.7805 [6] => Z [7] => 5.1768 [8] => 5.2974 )X 3.5000 3.5600
Y 2.7234 2.7805
Z 5.1768 2.2974
and another qusetion is: I have the follwing list...
x
3
4
Y
34
2
Z
1.125
3
... is there a way to create an array like this:
Code: Select all
$arr = array("X" => array([1] => 3, [2] => 4),
"Y" => array([1] => 34, [2] => 2),
"Z" => array([1] => 1.125, [2] => 3));