In my question about HTTP protocol I understand that HTTP requests have a format that is described by the protocol itself.
However, in PHP there is a function that sends data to HTTP which is the header() function and I did not quite...
I need to create a list of dates in PHP, where I will list all dates, from the first day of the year to the last. However, in that list, dates for the weekend (Saturday and Sunday) should be skipped.
Example:
01/02/2016 => Segunda
02/02/...
I am developing a Revenue / Expense launch system and this works according to what I initially need.
Processes. Revenue Posting, adds the amount of Revenue to the account table.
Example:
Initial Account Balance = 0.00
Revenue...
In C # there is the concept of local variables, see the example below:
if (true) {
int valor = 10;
}
else {
valor = 5;
}
Console.Write(valor);
The above code will return an error saying that the valor variable does not exist...
I'm using the str_pad function to get a string and fill it with 10 0 characters.
It's working perfectly, see the example:
echo str_pad("dda", 10, "0", STR_PAD_LEFT);
It writes 0000000dda .
The problem occurs when I...
I store the values of the products in the database as follows:
For example:
R$ 5.000,00
How do I do in PHP to make this number stay 5000? In other words, "deformat"?
Do you have any function that works for any number? Something like t...
I have two regular expressions:
$exp1 = '/^abc.*\_20150430.txt$/'
$exp2 = '/^def.*\_20150430.txt$/'
It should return true for files started by abc in the first and def in the second. In both expressions the string should end with _20...
I was giving a stir in the sublime text and I came across something I did not expect when I typed the function array_keys
array_keys(arg, search_value, strict);
I did the test and the second parameter actually works.
What is the...
I have the following error:
Fatal error: Can't use method return value in write context in /home/username/public_html/Administrar/application/controllers/holerites.php on line 29
The following sequence of lines 29 follows:
if(empty($this-...