Como lidar com strings complicadas no PHP
Publicado por Cézar Augusto em 15/04/2020
[ Hits: 1.812 ]
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
Problemas para instalar WoeUSB no Debian, Ubuntu e derivados [Resolvido]
Navegadores WebKit VS Placas NVidia
Como montar arquivos .img do Android
Partições BTRFS Nativamente no Windows
mysql_num_fields e mysql_field_name no PHP
Configurando o phpMyAdmin para acessar o MySQL remotamente
Suporte PHP5 oci8 no Oracle 11g - Ubuntu 8.04 Server
Enviando parâmetros para o Google e gravando o resultado em banco
Compilando o PHP4 com acesso ao banco Interbase / Firebird no Conectiva 9
LazyDocker – Interface de Usuário em Tempo Real para o Docker
Instalando COSMIC no Linux Mint
Turbinando o Linux Mint: o poder das Nemo Actions
Inteligência Artificial no desenvolvimento de software: quando começar a usar?
A compatibilidade do LibreOffice com o Microsoft Office
Colocando hotcorner no COSMIC para exibir "workspaces"
Usando o Dolphin para checar hashes de arquivos
Quais licenças open source têm valor jurídico? (0)
Problema com som no laptop (2)









