Jump to content

search string after explode


sandy1028

Recommended Posts

please use the [ code ] brackets, anyway

<?php
$name=$_POST['name']
$lines= file(data.txt);
foreach ($lines as $line) {
       $text_line[] = explode(":" , $line);
}
foreach($text_line as $value){
          if(strchr($value,$name){
          $match[] = $value;
}
print_r($match);

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.