I'm having trouble checking if the value of $_GET is integer. Here is the code:
<?php
$modo=$_GET['PG'];
if(is_int($modo)){
echo "e inteiro";
}else{
echo "n e inteiro";
}
?>
Even though I p...
I was in Github and came across a class like this:
final class Noticia
{
[...]
}
What is the purpose of this final reserved word?
Can only be used in classes?
I have the following foreach ():
$i = 1;
foreach($listagem as $valor){
echo $i; // O que vai me retornar: 1, 2, 3, 4, 5, ..., 100
$i++;
}
How do I do the reverse process?
I would like to return: 100, 99, 98, 97, ..., 1
I have a php file on my site that serves as a template for a single page of the site, inside this file there is only HTML code, it has no php <?php ?> tag, nor anything. It's like an html file, but with the .php extension
My ques...
I'm having a syntax problem when trying to put a if inside a echo in PHP.
Check out the code:
foreach($resultadoBusca as $escrever){
echo "<tr><td>" . $escrever['cod_votoran'] . "</td>
<td>" . u...
Hello, I need to do an administrative area, and obviously I need a login system and password. I know there are already questions here, but I fear they are outdated. I want a way inside the simple and safe possible. I also do not want anyone to d...
How can I change this code below?
It takes the numeric values placed in MySQL in the comma separated table by placing them in the 1,2,3,4,5,6,7,8,9,10 table. Then it counts the total of items placed in this table separated by the comma...
How do I join multiple variables into a single object? How do I get the following code?
<?php
class Produto {
//Atributos
var $cpu;
var $mb;
var $psu;
//Getters & Setters
function setProduto($produto, $produto1)...
How do I make a calculator in php?
I made the code but it does not display result.
<!DOCTYPE HTML>
<html lang = "pt-br">
<head>
<title> Exemplo</title>
<meta charset = "UTF-8">
</h...