Como lidar com strings complicadas no PHP
Publicado por Cézar Augusto em 15/04/2020
[ Hits: 1.451 ]
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)";
Problemas para instalar WoeUSB no Debian, Ubuntu e derivados [Resolvido]
Como verificar a integridade das stock ROMs da Samsung
Tema escuro no Elementary sem programas
Alterar resolução de tela pelo monitors.xml
Múltiplos portais em Xoops com o mesmo DB
mysql_num_fields e mysql_field_name no PHP
Enviando parâmetros para o Google e gravando o resultado em banco
Geração automática de menu drop down com banco de dados em PHP
Resolver problemas de Internet
Como compartilhar a tela do Ubuntu com uma Smart TV (LG, Samsung, etc.)
Descritores de Arquivos e Swappiness
Solução rápida para o problema do Network Manager conectar mas não navegar
Como instalar no Linux Jogos da Steam só para Windows
Instalando o Team Viewer no Debian Trixie - problema no Policykit
Qual driver da NVIDIA instalar? (4)
Erro GLPI 10.0.0.18 - Ticket (1)