How to manually update your IPhone/iPad to iOS 6 using iTunes

What happens if you downloaded iOS 6 via iTunes and then after the download was complete you’ve receive an error that updating your iPhone failed? Luckily there’s a solution to update your iPhone/iPad manually using the iOS 6download file. Follow the steps below to install the iOS 6 download file manually STEP 1 Open iTunes and make sure your device is connected STEP 2 Click on the Device under Devices on the left and the main content screen will open up ...

March 22, 2018 · 1 min · 160 words · icarnaghan

How to open all links in a New Browser Window

Insert the following code between the and html tags. After inserting this piece of code all links should open in a New Browser Window.

March 22, 2018 · 1 min · 24 words · icarnaghan

How to print the contents of an array using PHP

//Array example $arr = array(‘one’,’two’,’three’,‘four’); Use the print_r function. Example: print_r($arr); The example above will print out the following: Array ( [0] => one [1] => two [2] => three [3] => four ) NOTE: If you want to have the contents of the array displayed in a more readable format, add a echo ‘’; statement before calling the print_r function. Example of the results: Array ( [0] => one [1] => two [2] => three [3] => four ) Explanation: ...

March 22, 2018 · 1 min · 93 words · icarnaghan

How to raise the PHP memory limit, upload limit, or script execution time limit within the .htaccess file

Open your .htaccess file and add the line below to it php_value memory_limit 40M This will increase the PHP memory limit, if the altering of the .htaccess file is allowed

March 22, 2018 · 1 min · 30 words · icarnaghan

How to redirect your whole website using 301 redirect within the .htaccess file

In your Document root open the .htaccess file if present otherwise create a .htaccess file Once the file is open edit the contents of the file and add the following code to it Redirect 301 / http://yoursite.com/ Replace the url with your url where you want your website to be redirected to. Upload the .htaccess file and test, the redirection should work

March 22, 2018 · 1 min · 62 words · icarnaghan

How to register/include the JQuery UI in the Yii Framework 1.1.x

Include the following code anywhere in your application Yii::app()->clientScript->registerCoreScript('jquery.ui'); The code abouve will register jquery-ui in your application

March 22, 2018 · 1 min · 18 words · icarnaghan

How to remove a specific value within an array using PHP

If you have an array and you wish to remove the “None” values in the array you can use the method below, please replace the “None” value with the value you need to remove from the array $array = array("Apple","Orange","None"); //The array //Removing all None values from the array foreach (array_keys($array, 'none') as $key) { unset($array[$key]); } print_r($array); //This will output the array without the value None

March 22, 2018 · 1 min · 67 words · icarnaghan

How to remove all 0's (zeros) from an PHP array

If I have the following PHP array $array = array(9,0,6,4,5,0,9,0,0,0); and I need to have all 0’s removed from it. Use the PHP array_filter function. If you don’t supply a callback function it will filter out all values that are equal to false $new_array = array_filter($array);

March 22, 2018 · 1 min · 46 words · icarnaghan

How to remove all characters exept numbers from a string using PHP

This is really easy, we will make use of the preg_replace PHP Function which is 100% compatible with PHP 5.3 Example: $string = 'This is my phone number: +28 (0)212 1234!!! ' $numberString = preg_replace('[\D]', '', $string); echo $numberString; //Will output 2802121234 This is a good way to format phone numbers etc. The regular expression character \D means to match a character that’s not a digit

March 22, 2018 · 1 min · 66 words · icarnaghan

How to remove all empty/null values in an array using PHP

If you have an array with empty values and you wish to remove the empty valuesyou can use the following one line code $array = array('','1','','3'); $array = array_filter($array, 'strlen'); echo '<pre>'; print_r($array); echo '</pre>'; The result will be only the NOT NULL values Array ( [1] => 1 [3] => 3 )

March 22, 2018 · 1 min · 53 words · icarnaghan