Como lidar com strings complicadas no PHP
Publicado por Cézar Augusto em 15/04/2020
[ Hits: 1.685 ]
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)";
Navegadores WebKit VS Placas NVidia
Servidor web simples sem instalar nada
Alterar resolução de tela pelo monitors.xml
Como ver a saída de qualquer comando MySQL no PHP
Compilando o PHP4 com acesso ao banco Interbase / Firebird no Conectiva 9
Instalação e configuração Apache2 + PHP + MySQL + PostgreSQL
IA Turbina o Desktop Linux enquanto distros renovam forças
Como extrair chaves TOTP 2FA a partir de QRCODE (Google Authenticator)
Linux em 2025: Segurança prática para o usuário
Desktop Linux em alta: novos apps, distros e privacidade marcam o sábado
IA chega ao desktop e impulsiona produtividade no mundo Linux
Atualizando o Fedora 42 para 43
Como saber se o seu e-mail já teve a senha vazada?
Como descobrir se a sua senha já foi vazada na internet?
Mint Xfce não mantém a conexão no wi-fi (1)
Problemas com Driver NVIDIA (5)
Warcraft II Remastered no Linux? (8)









