Hi iI have been making a web page in PHP and JavascriptJavaScript to take employees clock times and do some things with them so iI can display them everything. Everything is currently working quite well, but the code looks like rough.
'; $Arr = @array('Op' => $Data['Op'], 'Name' => $Data['Name'], 'WorkHours' => $Data['WorkHours'], 'Start' => $Data['Start'], 'End' => $Data['End'], 'Clock' => substr($data[0], 11, 8), 'OFF' => substr($data[1], 11, 8), 'ON' => substr($data[2], 11, 8), 'OUT' => substr($data[3], 11, 8), 'Late' => $lated, 'Home' => $homed); return $Arr; } } $People = (object) array( 'People' => array( array( 'Person1' => $person1->GetTimes(), ), array( 'Person2' => $person2->GetTimes(), ), array( 'Person3' => $person3->GetTimes(), ), array( 'Person4' => $person4->GetTimes(), ), array( 'Person5' => $person5->GetTimes(), ), array( 'Person6' => $person6->GetTimes(), ), array( 'Person7' => $person7->GetTimes(), ), array( 'Person8' => $person8->GetTimes(), ), array( 'Person9' => $person9->GetTimes(), ), array( 'Person10' => $person10->GetTimes(), ), array( 'Person11' => $person11->GetTimes(), ), array( 'Person12' => $person12->GetTimes(), ), array( 'Person13' => $person13->GetTimes(), ), array( 'Person14' => $person14->GetTimes(), ), array( 'Person15' => $person15->GetTimes(), ), array( 'Person16' => $person16->GetTimes(), ), array( 'Person17' => $person17->GetTimes(), ), array( 'Person18' => $person18->GetTimes(), ), array( 'Person19' => $person19->GetTimes(), ), array( 'Person20' => $person20->GetTimes(), ), array( 'Person21' => $person21->GetTimes(), ), array( 'Person22' => $person22->GetTimes(), ), array( 'Person23' => $person23->GetTimes(), ), array( 'Person24' => $person24->GetTimes(), ), array( 'Person25' => $person25->GetTimes(), ), array( 'Person26' => $person26->GetTimes(), ), array( 'Person27' => $person27->GetTimes(), ), array( 'Person28' => $person28->GetTimes(), ), array( 'Person29' => $person29->GetTimes(), ), array( 'Person30' => $person30->GetTimes(), ), array( 'Person31' => $person31->GetTimes(), ), array( 'Person32' => $person32->GetTimes(), ), array( 'Person33' => $person33->GetTimes(), ), array( 'Person34' => $person34->GetTimes(), ), array( 'Person35' => $person35->GetTimes(), ), array( 'Person36' => $person36->GetTimes(), ), array( 'Person37' => $person37->GetTimes(), ), array( 'Person38' => $person38->GetTimes(), ), array( 'Person38' => $person39->GetTimes(), ), array( 'Person38' => $person40->GetTimes(), ), array( 'Person38' => $person41->GetTimes(), ), ) ); $time_end = microtime(true); file_put_contents('People.json', json_encode($People)); $execution_time = round((($time_end - $time_start) / 60), 3); echo 'Total Execution Time: ' . $execution_time . ' Mins '; So this This code takes people that iI have initatedimitated in the included People`People` select file and then, runs some query'squeries and joins the data and then, puts it all in tointo an array and then in to a JSON file. However, however thethere must be a better way of doing what iI have done here . Here is how iI am picking the people in the PeopleSelect.php file : "); break; case 6: print("Today is Saturday"); break; }