PHP MySQL check if request have ' # ' char insert a new row
===

I Have some request like below :  

    $input  = "$POS,1234,5223,A,2719";
If get a request like above , process an save to database with below code :  
	
	$input_ex = explode(",", $input);

	$input_ex[0];
	$input_ex[1];
	$input_ex[2];
	$input_ex[3];
	$input_ex[4];
	
	mysql_query("INSERT INTO table_name (cl_1,cl_2,cl_3,cl_4,cl_5)
	values ('$input_ex[0]','$input_ex[1]','$input_ex[2]','$input_ex[3]','$input_ex[4]')

***Problem:***  
my inputs may be sometimes more than one and split with ' # ' character  
last row of inputs is maybe have ' # ' character too   

    $input  = "$POS,1234,5223,A,2719#
    $POX,752,4342,N,SXD#
    $POZ,122,6242,B,XFB#";

***How*** can i separate each row and insert it on database as a new row ?  
thanks ;)