Questions tagged as 'php'

3
answers

redirect to within site

I have a system, with login and password, that sends notification, by email, to users, when a certain situation occurs. When the user clicks on the email notification link, it is redirected to an internal system page, BUT, if the user is not log...
asked by 10.07.2015 / 19:48
2
answers

Doubt about decrement operator

I have these 2 lines in my function, but what would be the line below? $idade--; Would not the return just be the same? $idade--; return $idade; I just wanted to understand what this line would look like. I do not like to use something...
asked by 28.05.2015 / 23:09
2
answers

How to round to the nearest ten in PHP?

I saw this question here in Stack Overflow How to round to the nearest ten? and found it very interesting. Only the question is about JavaScript. How could I round off a number to the nearest ten in PHP? Example: 11 => 20 23 =&...
asked by 18.10.2015 / 23:32
3
answers

Convert Array to String

Why when I convert the array to a string it does not convert all the keys in the array right: Code: <?php $bMsg3 = array( $at1 = 0, /* Inteiro */ $at2 = "", /* String */ $at3 = 0.0, /* Flo...
asked by 28.07.2015 / 14:00
3
answers

Is this a bug in stdClass?

In PHP it is possible to declare a variable at the same time that we pass it as a parameter of a function or in the instantiation of the class. I'll give an example with the function is_file and the class ArrayObject . $arrayOb...
asked by 04.08.2015 / 15:28
2
answers

Get ID of a line that was just created in PHP

Hey guys, So I have a problem that is as follows, I have a table players , a table training and a helper table treadmill (where will I see if some player is currently training) The question is, how can I do that by the time I create a worko...
asked by 10.11.2015 / 19:44
2
answers

How to convert a yaml to PHP array?

How could I do to convert yaml data to a array of PHP? Example yaml: Usuario: nome: Wallace idade: 25 linguagens: - PHP - Python - Javascript     
asked by 28.08.2015 / 18:14
3
answers

Query value within a variable

I would like to know if you have php to do the following let's say I have a value inside a variable $ text="here is the value of the member text" Within the value of this variable I would like to query only the specific word in the case in...
asked by 02.06.2015 / 04:19
3
answers

String handling in alternate positions

I have an output via EXPECT access to an equipment and I get the data below: $result1 = " =============================================================================== Service Basic Information...
asked by 12.06.2017 / 22:17
2
answers

How to convert scientific notation to string with full number

What php function should I use to do this type of conversion?    Converter: 1.3388383658903E + 18 for: 1338838365890273563 I tried this, but it did not work: echo sprintf(sprintf('%%.%df', 0), '1.3388383658903E+18'); And that too:...
asked by 04.10.2016 / 19:26