<?php
error_reporting(0);



    $no_of_emi = $_REQUEST['select_emi_no'];
    $sett_amount = $_REQUEST['sett_amount'];
    $emi_type = $_REQUEST['emi_type'];
	
	$emi = 0;
	
	
	
	$emiArr = array();
	$standardArray = array();
	
	
	if($emi_type == 'equal')
	{
		
	for($i=0;$i<$no_of_emi;$i++)
	{
	 
		$emi = $sett_amount / $no_of_emi;
	    $emi = round($emi,2);
		$emiArr[] = $emi;
 
	}
	
	}
	
	
	if($emi_type == 'standard')
	{
		if($no_of_emi == 1)
		{
			$emiArr[] = round($sett_amount,2);
		}
		
		
		if($no_of_emi == 2)
		{
			$emiArr[] = round($sett_amount/2 ,2);
			$emiArr[] = round($sett_amount/2,2);
		}
		
		if($no_of_emi == 3)
		{
			$emiArr[] = round(($sett_amount * 50/100)  ,2);
			$emiArr[] = round(($sett_amount * 30/100)  ,2);
			$emiArr[] = round(($sett_amount * 20/100)  ,2);
		}
		
		
	}
	
	
	
	
	
	
	
	
	
	
	   
	 
	?>
	
	<br/>
	
	<?php
	
	for($i=0;$i<$no_of_emi;$i++)
	{
		
		?>
		
		    <div class="input-group" style="margin-left: -4px;" >
            <span style="width: 150px;" class="input-group-text fw-bold"> EMI <?php echo $i+1; ?> : </span>
            <input type="number" name="emi_breakup[]"  readonly value="<?php echo $emiArr[$i];  ?>"  class="form-control"  >
            </div>
		
		<?php
	}


	 
	 
	
	
	

?>