₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,329,644 members, 8,441,649 topics. Date: Wednesday, 08 July 2026 at 08:55 PM

Toggle theme

Simple Php Challenge - Programming (4) - Nairaland

Nairaland ForumScience/TechnologyProgrammingSimple Php Challenge (9893 Views)

1 2 3 4 Reply (Go Down)

Re: Simple Php Challenge by Nobody: 1:10pm On Jul 14, 2013
spikes C: wtf huh
god of PHP, who's smiling now?? tongue

Anyway, Spikes' really good, wouldn't mind another challenge. wink
Re: Simple Php Challenge by spikesC(m): 1:19pm On Jul 14, 2013
Judinho59: god of PHP, who's smiling now?? tongue

Anyway, Spikes' really good, wouldn't mind another challenge. wink
yeye man angry

Do i need to argue, i won...shekina cool

You used multiplication when the rules clearly stated addition wink
Re: Simple Php Challenge by Nobody: 1:33pm On Jul 14, 2013
^^^ grin grin grin grin cool
Re: Simple Php Challenge by elvis10ten(op): 1:53pm On Jul 14, 2013
spikes C: yeye man angry

Do i need to argue, i won...shekina cool

You used multiplication when the rules clearly stated addition wink
he used addition in the last code.
Re: Simple Php Challenge by spikesC(m): 2:00pm On Jul 14, 2013
elvis10ten: he used addition in the last code.
ehe?
Re: Simple Php Challenge by elvis10ten(op): 2:25pm On Jul 14, 2013
Re: Simple Php Challenge by Z8(m): 9:26pm On Jul 14, 2013
$j = 7
for($i = 7; $i<=300; $i++){
echo <<<EQD
7 X {$i } = {$j}
EDQ;
$j+=7;
}

// this will solve it...
Re: Simple Php Challenge by bunmioguns(m): 11:41am On Jul 24, 2013
[quote author=Okiki_Oluwa]@bunmioguns, je ki a sare pari ise yi.[/quote]pari ise funra e ooo, i no dey there grin grin grin grin grin
Re: Simple Php Challenge by timomaradona: 12:30pm On Feb 02, 2015
<?php
$then = mktime();
for($i=1;$i<=300;$i++){
$sum = 0;
for($j=0;$j<$i;$j++){
$sum += 7;
}
echo "7 x $i = $sum \n";
}
$time = (mktime() - $then)/1000;
echo "done in $time secs.";
?>
Re: Simple Php Challenge by Cactus(m): 5:19pm On Feb 02, 2015
Dont know why replying this old post but if people are curious. Here ya go

Option A

<?php
$sum = 0;
for($i=1;$i<301;$i++)
{
echo "7 x $i = ";

$sum += 7;
echo "$sum \n";
}
?>


Option B

<?php
for($i=1;$i<301;$i++)
{
echo "7 x $i = ";
$arrnum[] = 7;
echo array_sum($arrnum) . "\n";
}
?>
1 2 3 4 Reply

Please Help Me Write This Simple Php Switch StatementSimple PHP Quiz: Kill The Rand()Simple Php Quiz: Why Will This Code Not Work If You Are Uploading Files?234

Laravel:call To Undefined Method Illuminate\database\eloquent\collection::save()Python TutorialMy New Year Resolution: 1 Million Naira A Month From Android App Dev In 2015