Skip to content

Tag: php

Regex match specific string without other string

So I’ve made this regex: to match only the first of the following two sentences: discount of €50,20 on these items This item on sale now for €30,20 As you might’ve noticed already, I’d like the amount in the 2nd sentence not to be matched because it’s not the discount amount. But I&#82…

PHP find similar ID’s (EAN codes) and show if excist

I have a database with different kind of products that have similar ID’s (EAN codes). I’m trying to print a list of all similar codes so I can import them and connect them to the same product. Example: Product Y has ID 190198001795 and 0190198001795 Product X has ID 190198001780, 0190198001780 and…

How can getdate[“weekday”] start from Monday instead of sunday?

I need to start the “weekday” of getdate() to Monday instead of Sunday, is there a way to do this? Here is my code, don’t worry about the parameters in validatePlanningVendeur the problem is when i try to get the current date arret, so that it can validate from Monday till arret. You might n…

solving problems in session? [closed]

I have created two pages , one is index.php and admin.php . In the first page or index.php , i have created a loggin form so that i can access the admin.php page trough the loggin or like this enter …

Execute node script in php from remote server

I have a web application that interacts with API. In html file is an element with onclick property for this function: Then index2.php has written only this code: <?php exec(“/usr/local/bin/node script.js”); ?> The script.js is just a file which is executed. Everything works fine on my maschi…