Tag Archives: image

Swapping Array Keys and Values

Swapping Array




In this article we discuss about Swapping Array Keys and Values. If you want interchange the keys and values of an associative array. It’s very easy, just use PHP’s array_flip() function which perform a very specialized task. It reverses the key-value relationship for all the elements of an associative array and returning a new array that is the mirror image of the original. <?php $opposite_key_value = array(“white” => “black”, “day” => “night”, “open” => “close”); print_r(array_flip($opposite_key_value)); ?>

Php Interview Questions and Answers – Part 8

Php Interview Questions and Answers




Php Interview Questions and Answers – Part 8 1- Give the syntax of REVOKE commands? The generic syntax for revoke is as following REVOKE [rights] on [database] FROM [username@hostname] Now rights can be: a) ALL privileges b) Combination of CREATE, DROP, SELECT, INSERT, UPDATE and DELETE etc. We can grant rights on all database by using *.* or some specific database by database.* or a specific table by database.table_name. 2- What is the difference between CHAR and VARCHAR data types? […]

Add Favicon To WordPress Blog Easily

images




A great favicon makes your blog standout from the herd and helps you in promoting your site in a big way. But before I will tell you How to add a favicon to WordPress blog in an easy way, I like to tell you – What a favicon can do for your blog or website? A favicon (short form of favorite icon) is a tiny graphic icon displayed next to the URL in the address bar, on tabs and on […]

Increase Google Author Rank – 11 Great Tips

increase google author rank




improving or Increase Google Author Rank is the latest craze among content creators and content marketers to achieve higher ranks in Google SERPs. In an attempt to show the best search results, or deliver best possible user experience to web-searchers Google is planning to add Author Rank as a search engine ranking signal to its existing algorithm. Definition: Google Author Rank is a numeric value ranging from 0 to 10 (just like Page Rank). Which is based upon the popularity, expertise […]

Php Interview Questions and Answers – Part 5

php3




1- How to reset/destroy a cookie ? Reset a cookie by specifying expire time in the past: Example: setcookie(‘Test’,$i,time()-3600); // already expired time Reset a cookie by specifying its name only Example: setcookie(‘Test’); 2- What types of images that PHP supports ? Using imagetypes() function to find out what types of images are supported in your PHP engine. imagetypes() – Returns the image types supported. This function returns a bit-field corresponding to the image formats supported by the version of […]

11 Great Tips to Writing Blog Post

blog-post-writing




Wanna write a great blog post and grab the social media attention by flurry of re-tweets, likes or StumbleUpon ? Or, want to list your blog post on the 1st page of Google and drive loads of traffic to your blog ? I will tell you 11Tips to Writing Blog Post which is not only SEO friendly but also the potential to go viral in social media. Blog Post Writing – 1st Phase 1. Great and successful blog post always takes […]

Can You Answer These 10 SEO Questions

Running businessman.




I’ve compiled a set of 10 useful SEO questionnaire to brush-up your SEO knowledge. Sometimes, instead of reading lengthy articles and spending hours together, a few well-structured questions can make you dig deeper into the topic. I’m sure – most of the answers you already know. Rate yourself by giving you “number of questions you have answered correctly out of 10.” For better results/knowledge don’t read the answer immediately. Read the question, think a bit, and match your guess by […]

How to add a Favicon in WordPress Blog

favicon




Favicon = Favorites + Icon . Favicon is just like a signature of your blog. It’s  a 16 x16 px square, graphic icon displayed by the browsers in the URL bars or on tabs to visually identify a particular website or blog. When users bookmark a website, the favicon helps visual identification of that site. The 16 x16 px graphic icon is shaved as favicon.ico in the root directory of your server. Create a favicon 1. First of all, you […]

Rename Product Image in SQL Query Oscommerce

oscommerce




How to Rename Product Image in SQL Query in osCommerce. In Oscommerce it is simple to rename the product image in sql query. IN the below is the simple script to sove this require(‘includes/application_top.php’);  $products_query = tep_db_query(“select * from products”);  while ($products_values = tep_db_fetch_array($products_query)) {   $products_id = $products_values[‘products_id’]; $products_image = $products_values[‘products_image’]; $image = $products_image.’.jpg’; //echo $image; //echo $products_id; //echo $products_image; $sql = “update products set products_image = ‘” .$image .”‘ where products_id = ‘” . (int)$products_id . “‘”; $update_query […]