Sam163 Posted July 28, 2013 Share Posted July 28, 2013 Hello, it's my first time in this forum, I hope somebody could help me with my bugI have an extended class called 'Show' from 'Database'has a method called 'get_time'.. and it could be with arguments 'm' for minutes or 'h' for hoursthe class works as expected in any empty file.php but causes problem with the formhere's the method class Show extends Database { //other methods above here public static function get_time ($arg=null) { $days = self::retreive_days(); // $days is supposed to retreive this string "dai-3:20 sun-1:30 tue-5:1 wed-1:3" $weekDays = array( 'dai', 'sat', 'sun', 'mon', 'tue', 'wed', 'thu', 'fri' ); foreach ($days as $key => $value) { $dayz[] = substr($days[$key], 0, 3); } $random_num = 0; foreach ($weekDays as $key => $value) { $myTime[$key] = null; foreach ($dayz as $key2 => $value) { if ($weekDays[$key] == $dayz[$key2]) { $myTime[$key] = substr( $days[$random_num], 4, strlen($days[$random_num]) ); $random_num++; } } } if ($arg=='m') { foreach ($myTime as $key => $value) { $seperator = strpos($myTime[$key], ':'); $results[] = substr($myTime[$key], $seperator+1, strlen($myTime[$key])); } return $results; } elseif ($arg=='h') { foreach ($myTime as $key => $value) { $seperator = strpos($myTime[$key], ':'); $results[] = substr($myTime[$key], 0, $seperator); } return $results; } else { return $myTime; } } } my problem is when I call the call it hides part of the form without even show me any php errorshere's snapshot for the normal and after calling the calls.. notice the end of v-scroll Quote Link to comment https://forums.phpfreaks.com/topic/280596-so-weird-thing-happens-with-my-php-form-need-help/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.