so i got txt file:
id|name|age
1|bull|29
2|yoshi|21
3|ivan|29
i want script to do
-search for a strings in file
-when string found in line output this line fields name and age
for example if i wrote in search - ivan
it returns - ivan is 29 years old
if searching - 29
it return bull is 29 years old, ivan is 29 years old
do i need to use strings
$fp = fopen("./text.txt", 'r') ) or die ("error..");
while (!feof($fp))
{ $texsts[] = fgets($fp, 1024); }
or array
<?php
$content = file('./some.txt');
and what would the full script be? 😕