Posts

Showing posts with the label PHP

Installing NetBeans - Linux

Before installing NetBeans you need to install JDK software. You can install the JDK software and NetBeans IDE in directories of your choice. Note: This installer does not displace the system version of the Java platform that is supplied by the operating system. You can run the following command to install JDK. sudo apt-get install openjdk-7-jdk Go to the NetBeans download page and download the PHP package. Save the file on the desktop. Now open terminal and run the following command. sudo sh netbeans-7.4-php-linux.sh After unpacking, you will find with the first step of the installation wizard. Go through the installation wizard. After that you will find net beans at Dash home or Applications. Now if you need to configure Netbeans for Drupal, see this .

Downgrading PHP 5.4 to 5.3 on Ubuntu

Download the shell script from here Once you have php5_4_downgrade_5.3.sh file you need to change the permissions using the following command su root chmod u+x ./php5_4_downgrade_5.3.sh Now you can run the script using the following command sudo sh php5_4_downgrade_5.3.sh Follow the on instructions

How to get most recent date from an array of dates?

$all_dates = array( "15-03-2015-14:50", "16-03-2013-14:50", "15-08-2017-14:52", "15-03-2014-14:50", "20-03-2016-14:50", ); // foreach($all_dates as $date_one){ $date_one_to_string = strtotime($date_one); $all_date_strings[$date_one] = $date_one_to_string; } arsort($all_date_strings); $latest_date_strings = current($all_date_strings); $key = array_search($latest_date_strings, $all_dates); print 'Latest Date Is :'.$latest_date_strings;