Skip to content
Advertisement

PHP file reading

I have a txt file with name source.txt and has the following content.

JavaScript

I read and echo all the content. But I want specific data and assign to the variable. if I need name. Then read the file and select john and assign to the variable

Advertisement

Answer

Here an mini code example

JavaScript

exemple script

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement