Questions tagged as 'php'

4
answers

How to separate values from a variable in php?

How to separate values from a variable and save to separate variables? Example: $valores = '12'; How to separate and save to other variables? So: $primeiroValor = 1; $segundoValor = 2;     
asked by 03.09.2014 / 14:11
3
answers

Generating an image based on other images

I have two HTML fields. In each of them, there will be a list of teams. When the user selects the two teams that will play (against each other), I would like to generate an image with the logos of both teams in PNG. Field 1 X Field 2 = PNG Im...
asked by 01.10.2014 / 22:21
2
answers

Date and Time in Datetime format

How do I concatenate these two variables to stay in ISO format (Y-m-d H: i: s)? $data = '17-04-2018'; $hora = '16:12';     
asked by 17.04.2018 / 17:15
3
answers

Comparison between PHP and mysql variables

I have no idea how to do a 'comparison' between 2 variables in the example below: ** if ($rows['block'] == $idBlock ) {/*....*/} else {/*....*/} So long as the id is equal to what is in mysql it will work, but it will have multiple ids sepa...
asked by 03.07.2018 / 20:50
3
answers

How to "break" the PHP variable and bring separate results

I'm a beginner in php. I have these variables: $tipo='a,b,c,d'; $metragem='15,18,32,44'; I need it to swallow a: 15 b: 18 c: 32 d: 44 but if the values are like these below: $tipo='a,,,'; $metragem='15,,,'; Just bring a: 15...
asked by 08.05.2018 / 20:46
2
answers

Builders in PHP 7

I was testing a class in PHP 7, and noticed that the constructor no longer works when it is created from the class name, only working when it is created with the name __construct . Example: <?php // Assim funciona: class MinhaClas...
asked by 31.03.2018 / 02:52
1
answer

Good practices Object Orientation

I have a class called clients. I have 2 methods called verificaCPF() and queryInsert() . Both methods when doing the statement it is a return (it is working normal). My question is whether this form I am doing is good prac...
asked by 09.07.2018 / 20:48
3
answers

Path for accessing html, css, php etc folders [duplicate]

Could someone explain me this system of nives to access folder in the use of languages like html, css and php (../)(.../)(./).?     
asked by 15.04.2017 / 20:54
2
answers

In PHP, is there a difference between Double and Float?

In some programming languages, Float and Double, although similar, are not the same thing. But apparently in PHP there is no difference between these two types. Is there any special reason for this? Why does Cast Double and Float result in th...
asked by 05.08.2017 / 19:28
2
answers

Search script does not return results or errors

Well, I created a PHP search script, but it does not display results, and it also does not display errors. Fomulário <form class="navbar-form navbar-right" method="post" action="pesquisa_card.php"> <div class="form-group">...
asked by 07.08.2017 / 16:38