Simply in php we could replace a string by other string such as using a particular function, str_replace (), etc
Suppose I have a file.txt contains
text1
text2
text3
...
text n
and i have a variable $text like
$text = "I want to get text1 and text2";
How to get the strings (text1 and text2) based on the available strings in file.txt?
I want to have a new variable say ($new) which contains strings of $text that it fits on the string file.txt
So i have $new="text1 text2";
I still confused, how to adjust two text.
Any help wouldbe appreciated. Thanks.