Shortcut to the main page: Alt + Shift + upper 2(@)
Linkedin FB e-mail Google Plus Twitter

Search in this website

 
 
Language versions are not identical,
so visit all versions,
which you can understand.

Scripts and functions in PHP (+ SQL, JS)

PHP: Explode function alternative

PHP: Script for substitution of explode function - allows to split a string by words and save them as an array elements (values). This algorithm (in comparison to explode function) allows to set whole array of delimiters at once (dot, exclamation mark, question mark, etc.) and keep an information about them.

 

PHP: Random sample of images

PHP function for random selection of requested number of files (or all) having entered extensions from entered directory at the server (webhosting). Typically for selection and insertion of needed number of random images.

 

PHP: Recalculate image size

PHP function for calculation of new size of image due to limits for maximal width and height. Keeps aspect ratio.

 

 

Jump up to: Navigation menu (keyboard shortcut „5”)

Are you interested by this page?

  • Add to bookmarks (Ctrl+D)
  • Share link (CB radio)Jump up to:
  • Print (Ctrl+P)
  • Cite according to ISO 690

    This page

    ADÁMEK, Martin. Scripts and functions in PHP (+ SQL, JS). Martin Adámek [online]. Náchod (Czech Republic) [cited 2019-11-22]. Available from: https://www.adamek.cz/en/sw/php

    Whole site

    ADÁMEK, Martin. Martin Adámek [online]. Náchod (Czech Republic) [cited 2019-11-22]. Available from: https://www.adamek.cz/en

 

 
 

National Cultural Heritage

This website is being archived by the National Library of the Czech Republic This website is regularly archived by the National Library of the Czech Republic for its cultural, educational, scientific, research or other values with the aim of documenting an authentic sample of the Czech web. It belongs to a collection of Czech websites to be preserved by the National Library and made available for posterity. Its record is included in the Czech National Bibliography and the National Library catalogue.  

 

 
 

For a distraction

Why do programmers always get Christmas and Halloween mixed up?
Because DEC 25 = OCT 31

 

For a muse

Our language is wise: It makes essential difference between „I am sure” and „I have made sure”.
[Karel Čapek]