How to filter out letters from text file (start of string and end) , then print them out

How to filter out letters from text file (start of string and end) , then print them out

The function needs to skip the lines in text file (after reading it) with contains symbol or numbers in FIRST &amp;&amp; LAST string position. For example string($password column)&nbsp;<strong>1</strong>21dafas<strong>d</strong>&nbsp;should be skipped AND not printed out, because it starts with number I have tried many things, but all trials failed. Im new to PHP language

The function needs to skip the lines in text file (after reading it) with contains symbol or numbers in FIRST && LAST string position. For example string($password column) 121dafasd should be skipped AND not printed out, because it starts with number I have tried many things, but all trials failed. Im new to PHP language

THE CODE
 function dataPrint(){

print "\t"." Users: Login Password <br>"; $file=fopen("data.txt" , "c"); if (!$file) print "Error! No such file!";

else {
print "<table><tr><th width="50%">Login</th> <th width="50%">Password</th> "; $info=file("data.txt"); foreach($info as $rec) {

             $rec=rtrim($rec);

             print("&lt;tr&gt;");
             list($login, $pass) = explode(' ', "$rec");
             print("&lt;td&gt;$login&lt;/td&gt;");
             print("&lt;td&gt;$pass&lt;/td&gt;");

     }

print("</table>");

Right now it prints all data as table

Login   Password 
quartz  2sp1lzod54at3sia6
quartz1 73u168rtz54a2q
quartz2 [email protected]

But it should print only those lines with contains only letters in start && end of string

Example :
Login     Password
quartz1   [email protected]   <----- NOT VALID(Should not be printed)
quartz2   asdf!2adf1      <----- NOT VALID(Should not be printed)
quartz3   [email protected]     <----- VALID
quartz4   gsasdff11e      <----- VALID
quartz5   [email protected]!adf1d    <----- VALID

The end should look like this..

Login     Password
quartz3   [email protected]
quartz4 gsasdff11e
quartz5 [email protected]!adf1d


php regex rest

What's new in Bootstrap 5 and when Bootstrap 5 release date?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Random Password Generator Online

HTML Color Picker online | HEX Color Picker | RGB Color Picker

What is REST API? An Overview | Liquid Web

What is REST? The REST acronym is defined as a “REpresentational State Transfer” and is designed to take advantage of existing HTTP protocols when used

Hire Dedicated PHP Developer

Looking to hire affordable yet experienced PHP developers? **[Hire Dedicated PHP Developer](https://hourlydeveloper.io/hire-dedicated-php-developer/ "Hire Dedicated PHP Developer")**, who can convert your idea to reality, within the stipulated...

PHP Web Application Development Company

As a top **PHP Web Application Development Company in USA**[https://www.dataeximit.com/php-development-services/](https://www.dataeximit.com/php-development-services/ "https://www.dataeximit.com/php-development-services/"), we at Data EximIT have...

Advantages of Hiring PHP Developer for your Website Project

PHP - Hypertext pre-processor, a scripting language used by many people in developing web pages, but most of us are unaware even of the full form. To train someone and make them learn this whole language is as difficult and time-consuming as it is...

How to Build PHP REST API Framework from Scratch

This PHP Framework tutorial explains how to build PHP REST API Framework from scratch. Create own PHP Rest framework to handle GET, POST, PUT and DELETE Requests.