subject

Song organizer< ? phperror_reporting(e_all); ini_set('display_errors',1); if (isset($_get['action'])) {if ((file_exists("songorganizer/songs. txt"))& & (filesize("songorganizer/songs. txt")! = 0)) {$songarray = file("songorganizer/songs. txt"); switch ($_get['action']) {case 'remove duplicates': $songarray = array_unique($songarray); $songarray = array_values($songarray); break; case 'sort ascending': sort($songarray); break; case ’shuffle’: shuffle($songarray); break; } // end of the switch statementif (count($songarray)> 0) {$newsongs = implode($songarray); $songstore = fopen("songorganizer/songs. txt","wb"); if ($songstore === false)echo "there was an error updating the song file\n"; else {fwrite($songstore, $newsongs); fclose($songstore); }}elseunlink("songorganizer/songs. txt"); }}if (isset($_post['submit'])) {$songtoadd = stripslashes($_post['songname']) . "\n"; $existingsongs = array(); if (file_exists("songorganizer/songs. txt")& & filesize("songorganizer/songs. txt")> 0) {$existingsongs = file("songorganizer/songs. txt"); if (isset($_post['submit'])) {$songtoadd = stripslashes($_post['songname']) . "\n"; $existingsongs = array(); if (file_exists("songorganizer/songs. txt")& & filesize("songorganizer/songs. txt")> 0) {$existingsongs = file("songorganizer/songs. txt"); if ("songorganizer/songs. txt"))|| (filesize("songorganizer/songs. txt")== 0))echo "there are no songs in thelist.\n"; else {$songarray = file("songorganizer/songs. txt"); echo "\n"; foreach ($songarray as $song) {echo "\n"; echo "" . htmlentities($song) .""; echo "\n"; }echo "\n"; }? > sort song list
remove duplicate songs
randomize song list
add a new songsong name:

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 12:00
The following function returns a string of length n whose characters are all 'x'. give the order of growth (as a function of n) of the running time. recall that concatenating two strings in java takes time proportional to the sum of their lengths. public static string f(int n) { if (n == 0) return ""; if (n == 1) return "x"; return f(n/2) + f(n - n/2); } options: a) constant b) logarithmic c) linear d) linearithmic e)quadratic f)cubic g) exponential
Answers: 2
question
Computers and Technology, 22.06.2019 13:30
Write lines of verse that rhyme to remember the following information: acid rain is a type of air pollution caused by chemicals in the air.
Answers: 1
question
Computers and Technology, 22.06.2019 22:40
Least square fit to polynomial write a function leastsquarefit3pol that solves a linear system of equations to find a least squares fit of a third order polynomial to an experimental data set given as two row arrays. the function leastsquarefit3pol must explicitly solve a set of linear equations and cannot use polyfit. there should be no restriction on the size of the problem that can be solved.
Answers: 1
question
Computers and Technology, 22.06.2019 23:20
How can you tell if someone sent you a text message to your email instead of a email
Answers: 1
You know the right answer?
Song organizer< ? phperror_reporting(e_all); ini_set('display_errors',1); if (isset($_get['action...
Questions
question
Mathematics, 09.02.2021 01:00
question
Mathematics, 09.02.2021 01:00