Boxing Class - Wordpress Themes - Kamala Harris - Market and finance - Debt Consolidation

PDA

View Full Version : matrix addition in php


hulkrana
May 24th 2007, 6:56 am
helo frds
i am new in php .please tel me how to perform matrix additon
<?php
echo "enter the number";
for(int i=0;int i<=2;int i++)
{
for(int j=0;int j<=2;int j++)
{
echo "enter the number" $a[i][j];
}
echo "\n";
}
?>
here i am not getting how to get the matrin values


thanks

tinkerbox
May 24th 2007, 8:06 am
Should be like this

for($i=0;$i<=2;$i++)
{
for($j=0;$j<=2;$j++)
{
echo "enter the number $i$j<br>";
}
}

coderbari
May 24th 2007, 11:54 am
php is a web scripting language not desktop/console.try this type of things in C/C++/JAVA

zzzttt
May 24th 2007, 11:58 am
make an html form, or get the data from a database ... you need to be more explicit.