<?php
<?php
$matriz1=array(25,67,50,0);
$matriz2=array(1,3,7,9);
$tam1=count($matriz1);
$tam2=count($matriz2);
if($tam1<>tam2)
echo"los arrays tienen distinto tamaƱo";
else
{
for($i=0;$i<$tam1;$i++)
{
$suma[$i]=$matriz1[[$i]+$matriz2[$i];
}
echo "El contenido de los arrays es:";
echo "Primer array:";
print_r($matriz1);
echo "Segundo array:";
print_r($matriz2);
echo "Array suma:";
print_r($suma);
}
- Output for 7.0.0 - 7.0.2
- Parse error: syntax error, unexpected '<', expecting end of file in /in/RRniD on line 2
Process exited with code 255. - Output for 5.5.24 - 5.5.31, 5.6.8 - 5.6.17
- Parse error: syntax error, unexpected '<' in /in/RRniD on line 2
Process exited with code 255.
preferences:
166.95 ms | 1395 KiB | 28 Q