I have created an array which contains;
The code for my array is:
foreach ($NewLang as $row => $val)
{
$writefile = implode(",", $val);
$filepath = $val[0];
}
This will display something like this:
basket.lang.php,LANG_BASKETUPDATED,Basket Updated,
My question is how can I use file_put_contents()
to write each line based on the value stored in $val[0]
?
Solved this by creating a function for writing the files and placing it in the foreach loop instead.
Now my foreach loop looks like this:
foreach ($NewLang as $row => $val)
{
{
append_define($val[0], $val[1], $val[2]);
}
}