I am using this code for reading data from any file but if i want to read data from excel sheet then what should i do?
<?php if(isset($_POST['submit'])){ $cir="certificate"; if(!is_dir($cir)){ mkdir($cir); } $image1=$_FILES['cir']['name']; $image=$_FILES['cir']['tmp_name']; $server_path=$cir.'/'.basename($_FILES['cir']['name']); $s=move_uploaded_file($image,$server_path); if($s){ //echo "successfully uploaded."; $file_open=fopen("$cir/$image1","r"); $file_read=fread($file_open,filesize("$cir/$image1")); echo $file_read; //$data = substr(strrchr("$cir/$file_read", ","),5 ); echo $file_read; }else{ echo "problem in uploading."; } } ?> <html> <body> <form name="form" method="post" enctype="multipart/form-data"> <input type="file" name="cir" /><br /> <input type="submit" name="submit" value="submit" /> </form> </body> </html> Excel sheet containing various shells like Name-XYZ, s.no-123 etc. I want that xyz should be put on a variable and 123 should be on another variable. What will be code in PHP?