PHP

PHP: Verificando se texto contém acentuação

Função simples e prática. Função para expressões regulares: ereg <? function temAcento($string) { $regExp = "[áàâãäªÁÀÂÃÄéèêëÉÈÊËíìîïÍÌÎÏóòôõöºÓÒÔÕÖúùûüÚÙÛÜçÇÑñ.]"; return ereg($regExp,$string); } $texto

MySQL, PHP

PHP-PDO: Como usar UTF-8 com MySQL e PDO

<?php $hostname = ‘nome_servidor’; $username = ‘nome_usuario’; $password = ‘senha’; $database = ‘nome_banco’;   try { $pdo = new PDO("mysql:host=$hostname;dbname=$database;charset=utf8",

Rolar para cima