Como lidar com strings complicadas no PHP
Publicado por Cézar Augusto em 15/04/2020
[ Hits: 1.448 ]
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)";
Alterar resolução de tela pelo Xorg
Como verificar a integridade das stock ROMs da Samsung
Partições BTRFS Nativamente no Windows
Otimizando conexões entre PHP e MySQL
Como ver a saída de qualquer comando MySQL no PHP
Enviando parâmetros para o Google e gravando o resultado em banco
Instalar Apache, PHP, MySQL e PostgreSQL no Ubuntu Linux 8.10
Como compartilhar a tela do Ubuntu com uma Smart TV (LG, Samsung, etc.)
Descritores de Arquivos e Swappiness
tux-gpt - Assistente de IA para o Terminal
Instalação e configuração do Chrony
Programa IRPF - Guia de Instalação e Resolução de alguns Problemas
Como instalar no Linux Jogos da Steam só para Windows
Instalando o Team Viewer no Debian Trixie - problema no Policykit
O Que Fazer Após Instalar Ubuntu 25.04
Erro ao atualizar o archlinux [RESOLVIDO] (2)
Erro ao executar o comando para dar um get email (0)