• Hi, i’m trying to insert wp post title into the following php code:

    // What to look for
    $search = 'insert the wordpress post title here';
    // Read from file
    $lines = file('links.txt');
    foreach($lines as $line)
    {
      // Check if the line contains the string we're looking for, and print if it does
      if(strpos($line, $search) !== false)
        echo $line;
    }

    and this code searches are case sensitive, how can i make it non-case sensitive?
    Thanks in advance.

    • This topic was modified 5 years, 9 months ago by bizzyfizzy.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘inserting wp post title into php code’ is closed to new replies.