Skip to content
pontikis.net
  • Blog
  • Labs
  • Write For Us
  • About
Search for:
Menu Close

tips

  1. Home>
  2. Blog>
  3. tips>
  4. Page 3
What is the JavaScript Equivalent of print_r in PHP?
Credits

What is the JavaScript Equivalent of print_r in PHP?

  • Post author:Christos Pontikis
  • Post published:October 2, 2013
  • Post category:Web Development
  • Reading time:2 mins read

What is the JavaScript Equivalent of PHP print_r() function? In other words, how you can "print" a javascript object in a way that's readable by humans? Code You could use…

Continue Reading What is the JavaScript Equivalent of print_r in PHP?
Create a Simple Banner Rotator with PHP in a Minute
Credits

Create a Simple Banner Rotator with PHP in a Minute

  • Post author:Christos Pontikis
  • Post published:September 27, 2013
  • Post category:Web Development
  • Reading time:1 mins read

PHP shuffle randomizes (shuffles) the order of the elements in an array. You may use this function to create a simple banner rotator. Define your banners Create $banners array with…

Continue Reading Create a Simple Banner Rotator with PHP in a Minute
Easily Create a Timezone List with PHP
Credits

Easily Create a Timezone List with PHP

  • Post author:Christos Pontikis
  • Post published:September 27, 2013
  • Post category:Web Development
  • Reading time:1 mins read

Sometimes, you want to create a list of available time zones to prompt your user to select his/her time zone. Fortunately, PHP offers timezone_identifiers_list (PHP 5 >= 5.2.0). You can…

Continue Reading Easily Create a Timezone List with PHP
Determine PHP script Invocation: CLI or by the Web Server
Credits

Determine PHP script Invocation: CLI or by the Web Server

  • Post author:Christos Pontikis
  • Post published:September 13, 2013
  • Post category:Web Development
  • Reading time:1 mins read

In most cases you can distinguish if a PHP script was invoked from the command line (or Cron) or by the web server, using php_sapi_name(). php_sapi_name() will return cli on…

Continue Reading Determine PHP script Invocation: CLI or by the Web Server
Replace accented characters with non accented with PHP
Credits

Replace accented characters with non accented with PHP

  • Post author:Christos Pontikis
  • Post published:September 9, 2013
  • Post category:Web Development
  • Reading time:4 mins read

Sometimes you need to replace accented characters with non accented, for example when you want to perform an accent insensitive search. A solution could be the following function: <?php /**…

Continue Reading Replace accented characters with non accented with PHP
  • Go to the previous page
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • Go to the next page

Categories

Archives

NewsLetter

Click here to subscribe to our free email newsletter.
Unsubscribe anytime with a click.

LIKE OUR PAGE!

  • Opens in a new tab
  • Opens in a new tab
  • Opens in a new tab
  • Opens in a new tab
  • Opens in a new tab
  • Opens in a new tab
  • Opens in a new tab
  • Contact
  • Privacy
  • Terms
  • Credits
© Christos Pontikis 2013 - 2021
Close Menu