Litterae.eu
Humanities & IT


MiniFunx For Dummies

๐Ÿ‡ฎ๐Ÿ‡น Di seguito le funzioni PHP presenti in MiniFunx spiegate e con esempi d'uso.
๐Ÿ‡ฌ๐Ÿ‡ง Here you may find MiniFunx PHP functions with explanations and usage exemples.

CLI()
๐Ÿ‡ฎ๐Ÿ‡น Sostituisce <br> con \n, se PHP sta funzionando da terminale.
๐Ÿ‡ฌ๐Ÿ‡ง It replaces <br> with \n if PHP is running from terminal (CLI).
echo cli("Break after this line.<br>");

CONTAINS()
๐Ÿ‡ฎ๐Ÿ‡น Verifica se una stringa contiene un dato testo. Non distingue tra maiuscole e minuscole.
๐Ÿ‡ฌ๐Ÿ‡ง It checks if a string contains a word. Case insensitive check.
if (contains("Alice in Wonderland","in") == true) { echo "ok"; } else { echo "no"; }

DEACCENT()
๐Ÿ‡ฎ๐Ÿ‡น Ricodifica le lettere con segni diacritici, ad esempio per usare una stringa come parte di un indirizzo.
๐Ÿ‡ฌ๐Ÿ‡ง It removes and codes accents in a string, e.g. for URL purposes.
$page = deaccent("C'รจ chi sรฌ e c'รจ chi no.");

FCLOSE_MULTI()
๐Ÿ‡ฎ๐Ÿ‡น Chiude piรน file alla volta.
๐Ÿ‡ฌ๐Ÿ‡ง It closes more files at a time.
fclose_multi("one.csv","two.txt","three");

HAS_NUMBERS()
๐Ÿ‡ฎ๐Ÿ‡น Verifica se una stringa contiene dei numeri.
๐Ÿ‡ฌ๐Ÿ‡ง It checks if a string contains any numbers.
if (has_numbers("Born in 1999.") == true) { echo "ok"; } else { echo "no"; }

INCLUDE_MULTI()
๐Ÿ‡ฎ๐Ÿ‡น Include piรน file alla volta.
๐Ÿ‡ฌ๐Ÿ‡ง It includes more files at a time.
include_multi("one.php","two.php","three.php");

REACCENT()
๐Ÿ‡ฎ๐Ÿ‡น Ripristina i segni diacritici codificati con deaccent().
๐Ÿ‡ฌ๐Ÿ‡ง It decodes and rewrites the accents of a string previously coded with deaccent().
$page = reaccent("C|e1_chi_si1_e_c|e1_chi_no.");

REQUIRE_MULTI()
๐Ÿ‡ฎ๐Ÿ‡น Richiede piรน file alla volta.
๐Ÿ‡ฌ๐Ÿ‡ง It requires more files at a time.
require_multi("one.php","two.php","three.php");

SPACES()
๐Ÿ‡ฎ๐Ÿ‡น Elimina gli spazi in eccesso in una stringa.
๐Ÿ‡ฌ๐Ÿ‡ง It deletes redundant spaces in a string.
echo spaces(" Once upon a time ");

URL_GET_CONTENTS()
๐Ÿ‡ฎ๐Ÿ‡น Alternativa a file_get_contents() per file remoti.
๐Ÿ‡ฌ๐Ÿ‡ง An alternative to file_get_contents() for remote files.
$remotefile = url_get_contents("www.thatsite.com/page.html");

Last update: September 2022.


Site designed by litterae.eu. © 2004-2022. All rights reserved.
Info GDPR EU 2016/679: no cookies used.