Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
I rent out caravans and am looking to offer pay monthly options.
We have worked out a formula in Excel but need to convert it to PHP.
The excel formula is:
monthlyCost=SUM("holidayCost"/(roundDown(((("holDate"-30)-"todaysDate")/30),0)))
The problem is rounding the number down.
Can anyone help?
round((( $holDate - 30 - $todaysDate)/30), 0, PHP_ROUND_HALF_DOWN);
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I have a project in which i have to make a code in which when we click on menu bar and the option that we select in menu bar the page related to that option will display all this is to be done through my sql.Is there any way to do this task.
I don't understand exactly what you want and if there is a better way to do this, but don't put in your sql fields PHP code.
You can create a xml document instead, and use it better.PHP.net - XMLdocument
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
I need to search word like 'Galaxy S Duos' using search keyword 'galaxysduos'. Kindly provide me the solution in PHP Mysql Query.
SELECT * FROM yourTable WHERE REPLACE(fieldname," ","")="galaxysduos"
try this added some modifiction of #Hanky's answer
SELECT * FROM `yout_table` WHERE LOWER(REPLACE(`your_field`," ",""))="galaxysduos"
OR
SELECT * FROM `yout_table` WHERE REPLACE(LOWER(`your_field`)," ","")="galaxysduos"
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
I'm trying to validate for UK phone numbers - the specific requirements I have are:
must only consist of digits
the only non-digit characters allowed are space and dash
must begin with a zero
Can anyone suggest a nice and simple regular expression I can use for this?
Try with following regex:
^0([ -]\d+)*\d+$
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
How could one build a system using PHP that tracks every event that occurs? Such as when someone comments on something, likes something or changes something.
The only thing that comes to mind right now is by the use of query strings when ever one invokes a command.
Try implementing the Observer pattern.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
I have seen this code in my header. php file, i don't know what is the use of this tag. They also mentioned initial scale=1.0 like that so can you anyone explain me what the use of that code.
It's used to set the initial scale of the layout. If the initial scale is set to 1, then the layout will be viewed at a scale of 1:1 (no zooming). It can be adjusted as well as changed to a set width.