[PHP] Normalization of strings – Upper and lower case

Hi, today again a small task to do in PHP. The following situation: We have a text-string in which is (obviously) a text. Lets say the content is: HERE you’ll get today CHEAP cucumber DIRECT from the farmer. We would like to change this string now like we want to change all words which consist […]

[PHP] Round numbers with PHP

Hi, today again a bit PHP. A small tip about handling with numbers in PHP. Or more explicit, round off numbers. PHP comes already with several functions to handle numbers. Four of them are number_format, ceil, floor and round. My personal favorite is  number_format. Why? Because this function does not just round, it is also […]

[PHP] Comments in PHP scripts

Hello together. Lets talk today about comments :) When you start coding a script then is it useful to comment your code. So a small documentation in the script. Because as long as you are working on the script and it is in a relative small size, then you know still which line of source […]

[PHP] Delete a file with PHP

Hi together, today I wand to answer the question how to delete a file with PHP. First of all we have to separate. Files on the web server or files on the local hard disk. First yes, second no. PHP doesn’t have access to files of the local file system of a visitor. No server […]

[PHP] How to add a line break in PHP

Hi, today I’ll like to talk about the subject line breaks with PHP. I guess this article will be not very long, because it’s done with a few lines of code. :)

Integrate affiliate tracking codes in Prestashop

If you operate a Prestashop and you’d like to work with affiliate networks, then you need to integrate their code in your shop. Here I shop you how to do it.

[PHP] Show/print all variables in use.

Hi, today I asked myself how the variables look like at the end of my script. I mean I use variables, include scripts, make database requests… and I always try to care to unset the variables again when I don’t need them anymore. But to I get all… or does my script use more and […]

[PHP] Generate a random password

Hi, because I need that from time to time and always looking again for a good function… here my memory aid. :-) $pwZeichen = ‘wertzupasdfghkyxcvbnmWERTZUPLKJHGFDSAYXCVBNM23456789’; srand ((double)microtime()*1000000); for($i = 0; $i < 5; $i++) { $passwort .= substr( $pwZeichen, (rand()%(strlen ($pwZeichen) ) ), 1); } In the variable $pwZeichen are all signs which can be […]