+ 3
How to add some code in a.php file with b.php file?
how to add some array in $love variable with other php file. function love() { $love = array( 'heart' => 'heart.png' 'sex' => 'sex.png' # add more array with other php file ); return $love; }
1 Réponse
+ 1
Am not sure what you mean but you can use fopen("file. txt",w) //to open the file you want to write from and use file() to read it. Then you can use some string functions and/regex to get the text you want and store them as variables then finally insert into your array, always remember you are using an associative array you need and index key.
When you are done with the file you are using remember to close using the function fclose("file. txt")