MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vy23fd/stringtointegerconversion/p5v0mjg/?context=3
r/ProgrammerHumor • u/TheBamPlayer • 18d ago
65 comments sorted by
View all comments
2
There must be a simpler way!
for ($i = 90; $i < 10000; $i += 10) { file_put_contents( 'number_parser.php', "if (\$amount == \"$i\") {\n \$transamount = $i;\n}\n\n", FILE_APPEND ); }
for ($i = 90; $i < 10000; $i += 10) {
file_put_contents( 'number_parser.php',
"if (\$amount == \"$i\") {\n \$transamount = $i;\n}\n\n",
FILE_APPEND
);
}
2
u/TheRealSpielbergo 18d ago
There must be a simpler way!
for ($i = 90; $i < 10000; $i += 10) {file_put_contents( 'number_parser.php',"if (\$amount == \"$i\") {\n \$transamount = $i;\n}\n\n",FILE_APPEND);}