Categoria: Php

0

PHP – Gestione Maiuscole/Minuscole stringhe

<?php $xo = ‘hello world!’; $xo = ucwords($xo);             // Hello World! $xa = ‘HELLO WORLD!’; $xa = ucwords($xa);             // HELLO WORLD! $xa = ucwords(strtolower($xa)); // Hello World! ?>

0

PHP – rilevare versione browser

< ?php $u_agent = $_SERVER[‘HTTP_USER_AGENT’]; // inizializzo variabili utilizzate if(preg_match(‘/MSIE (.*?);/’,$u_agent)) { // variabile }...

0

PHP – Generare password random

<?php function randomPassword() { $alphabet = “abcdefghijklmnopqrstuwxyz0123456789”; $RandomPass = array(); $alphaLength = strlen($alphabet) – 1;...