Skip to content

read file from today and yesterday in PHP

I need to open 2 files from my filesystem. Both files are csv-files. I need to determine the differences from both files: So I need to check, how the content has changed from yesterday compared to today. There will be exactly 1 file every day. The files are labeled according to the timestamp, so there is no r…

PHP looping through a function before returning value

I have simplified this. I have this line of code in a method in a (codeigniter framework) controller: And this is is the ‘loop1’ function: What I need to be able to do is loop through loop1 function until certain conditions are met before then returning the results array. Problem is calling the fu…

how to make a query with database as a variable

I have two databases – lorem and nts.lorem – and need to operate with both of them everything works fine until db is a variable in an ajax request – for example: js php any help? Answer Choose connection according to $db value:

PHP – unable to echo variables $error and $successMessage

This is a form validation code. I have a bootstrap form but my alerts don’t show up for some reason. My form is here – https://trendingpunjabi.com/test.php. I am able to do form validation in javascript but want this to work as well. Answer I got my answer from other source. See the text that foll…