La clase Upload and Compress

Upload And Compress es una clase que permite crear y borrar archivos ZIPs en el hosting donde la instales, a estos archivos puedes subir tus archivos preferidos como imágenes, datos, etc… de tal manera que puedas compartir tus archivos .zip con tus amigos o clientes. En la actualidad los clientes…

Continuar leyendo

Logical Operators

Logical Operators Example Name Result $a and $b And TRUE if both $a and $b are TRUE. $a or $b Or TRUE if either $a or $b is TRUE. $a xor $b Xor TRUE if either $a or $b is TRUE, but not both. ! $a Not TRUE if $a…

Continuar leyendo

Tipos de datos en PHP

El PHP soporta distintos tipos de datos, que no los tiene que impostar el programador, sino que son asumidos directamente por el motor, siempre que el programador no cambie el tipo (utilizando la función settype() ). Los datos pueden ser: Integer; Floating Point number; String; Array; Object.Vamos a verlos de…

Continuar leyendo

Librerías para Generar PDF con PHP

Estas son alguna librerías con las que podemos generar archivos pdf, bien personalizados , mediante código php.. FPDF: es una de las mas completas y usadas, Web de FPDF, Tutoriales de FPDF, Descargar FPDF TCPDF: esta hecha para php4 y 5, es opensource, Web de TCPDF, Tutoriales de TCPDF, Descargar…

Continuar leyendo

Redondear decimales en PHP

Entre las funciones matemáticas de PHP se encuentra una que nos permite redondear un float (número en coma flotante o número con decimales) al valor entero más próximo. Se trata de la función round(). Para explicar su uso, lo mejor es verlo con un par de ejemplos: round(0.6) devolvería el…

Continuar leyendo

Perl and PHP Regular Expressions

  PHP regexes are based on the PCRE (Perl-Compatible Regular Expressions), so any regexp that works for one should be compatible with the other or any other language that makes use of the PCRE format. Here are some commonly needed regular expressions for both PHP and Perl. Each regex will…

Continuar leyendo

Classes and Objects

The Basics class Basic class definitions begin with the keyword class, followed by a class name, followed by a pair of curly braces which enclose the definitions of the properties and methods belonging to the class. The class name can be any valid label which is a not a PHP…

Continuar leyendo

Internal (built-in) functions

PHP comes standard with many functions and constructs. There are also functions that require specific PHP extensions compiled in, otherwise fatal «undefined function» errors will appear. For example, to use image functions such as imagecreatetruecolor(), PHP must be compiled with GD support. Or, to use mysql_connect(), PHP must be compiled…

Continuar leyendo

Variable functions on PHP

PHP supports the concept of variable functions. This means that if a variable name has parentheses appended to it, PHP will look for a function with the same name as whatever the variable evaluates to, and will attempt to execute it. Among other things, this can be used to implement…

Continuar leyendo

Returning values

Values are returned by using the optional return statement. Any type may be returned, including arrays and objects. This causes the function to end its execution immediately and pass control back to the line from which it was called. See return() for more information. Note: If the return() is omitted…

Continuar leyendo