Como lidar com strings complicadas no PHP
Publicado por Cézar Augusto em 15/04/2020
[ Hits: 1.913 ]
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)";
Como verificar a integridade das stock ROMs da Samsung
Como verificar senha no shell script
Alterar resolução de tela pelo Xorg
mysql_num_fields e mysql_field_name no PHP
Ubuntu + Apache2 + MySQL + PHP5
Suporte PHP5 oci8 no Oracle 11g - Ubuntu 8.04 Server
Instalar Apache, PHP, MySQL e PostgreSQL no Ubuntu Linux 8.10
SynapSeq - programa para estimular as ondas cerebrais
Por que seu __DIR__ falhou ou o "inferno" dos caminhos no PHP
Preparando-se para certificações da LPI através do LPI Lab
Migração de Arch Linux para repositórios CachyOS (Uso de Instruções v3 e v4)
Jogando "Magic" gratuitamente no Linux
Zoxide e fzf no bash para incrementar o uso do Terminal
As diferencas entre o clipboard comum e a selecao ativa
Arch Linux com repos do CachyOS para otimização ou usar Gentoo?
O que você está ouvindo agora? [2] (243)
Abrir um arquivo URL pelo Clipper (7)
Eu aprendi o segredo das artes! hahaha (0)









