Jump to content

So weird thing happens with my php form. need help


Sam163

Recommended Posts

Hello, it's my first time in this forum, I hope somebody could help me with my bug
I 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 hours
the class works as expected in any empty file.php but causes problem with the form

here'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 errors
here's snapshot for the normal and after calling the calls.. notice the end of  v-scroll

post-164511-0-67236900-1375020636_thumb.jpg

post-164511-0-69266400-1375020643_thumb.jpg

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.