11.09.2018 Views

Aprender a desarrollar un sitio Web con PHP y MySQL

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

24/4/2014 ENI Training - Libro online<br />

<br />

Da como resultado:<br />

3.14<br />

Otro ejemplo:<br />

<br />

Da como resultado:<br />

3.78<br />

Es decir se ha redondeado el número.<br />

c. Tomar el valor absoluto de <strong>un</strong> número<br />

La f<strong>un</strong>ción abs($nombre) permite recuperar el valor absoluto de <strong>un</strong> número.<br />

Por ejemplo:<br />

<br />

Da como resultado:<br />

5.2<br />

Esta f<strong>un</strong>ción acepta como parámetro <strong>un</strong>a cadena de caracteres.<br />

Por ejemplo:<br />

<br />

Da como resultado:<br />

68<br />

d. Crear <strong>un</strong> identificador único<br />

http://www.eni-training.com/client_net/mediabook.aspx?idR=87313 12/15<br />

www.FreeLibros.me

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!