Como lidar com strings complicadas no PHP
Publicado por Cézar Augusto em 15/04/2020
[ Hits: 1.772 ]
Blog: https://www.cezarcampos.com.br/
<?php
public function insert(Bill $bill, int $user_id) : bool
{
$link = $this->link;
$billetBanking = $link->real_escape_string($bill->getBilletBanking());
$sql = "INSERT INTO `bill` (`description`, `price`, `expirationDate`, `barCode`, `billetBanking`, `paid`) ".
"VALUES ('".$bill->getDescription()."', '".$bill->getPrice()."', '".$bill->getExpirationDate()."', '".$bill->getBarCode()."', ".
"'".$billetBanking."', CONV('0', 2, 10) + 0)";
$link->query($sql);
return $this->addRelation($user_id);
}
?>
<?php
$msg = "
O
l
a
m
u
n
do";
echo $msg;
// Vai imprimir
// O l a m u n do
?>
$sql = "INSERT INTO `bill` (`description`, `price`, `expirationDate`,
`barCode`, `billetBanking`, `paid`)
VALUES ('{$bill->getDescription()}', '{$bill->getPrice()}',
'{$bill->getExpirationDate()}', '{$bill->getBarCode()}', '{$billetBanking}',
CONV('0', 2, 10) + 0)";
$sql = "INSERT INTO `bill` (`description`, `price`, `expirationDate`, `barCode`, `billetBanking`, `paid`) ".
"VALUES ('".$bill->getDescription()."', '".$bill->getPrice()."', '".$bill->getExpirationDate()."', '".$bill->getBarCode()."', ".
"'".$billetBanking."', CONV('0', 2, 10) + 0)";
Servidor web simples sem instalar nada
Navegadores WebKit VS Placas NVidia
Problemas para instalar WoeUSB no Debian, Ubuntu e derivados [Resolvido]
Partições BTRFS Nativamente no Windows
Alterar resolução de tela pelo monitors.xml
Ubuntu + Apache2 + MySQL + PHP5
Mostrar os campos de uma tabela do PostgreSQL com PHP
Suporte PHP5 oci8 no Oracle 11g - Ubuntu 8.04 Server
Múltiplos portais em Xoops com o mesmo DB
Descobrir a senha do PHPMyAdmin
Cirurgia para acelerar o openSUSE em HD externo via USB
Void Server como Domain Control
Modo Simples de Baixar e Usar o bash-completion
Monitorando o Preço do Bitcoin ou sua Cripto Favorita em Tempo Real com um Widget Flutuante
Cirurgia no Linux Mint em HD Externo via USB
Anúncio do meu script de Pós-Instalação do Ubuntu
Instalar Webmin no Redhat e derivados
Alguém pode me indicar um designer freelancer? [RESOLVIDO] (3)
Alguém já testou o novo COSMIC Desktop? O que achou? (6)
Por que passar nas disciplinas da faculdade é ruim e ser reprovado é b... (3)









